tag:blogger.com,1999:blog-6373963829340632529.post4389316983925772528..comments2024-01-30T05:40:30.415-03:00Comments on Algorithmically challenged: Build a binary tree from pre-order traversal and in-order traversalDanielhttp://www.blogger.com/profile/07505997833685327219noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-6373963829340632529.post-61833349454890391202015-05-23T12:50:04.970-03:002015-05-23T12:50:04.970-03:00well done sir, well donewell done sir, well doneAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6373963829340632529.post-54135099490213994532011-11-21T20:47:30.210-02:002011-11-21T20:47:30.210-02:00That depends on what you mean by ill-formed. Most ...That depends on what you mean by ill-formed. Most variations simply represent a valid tree. If, however, there are elements in one list nor present in the other, there can be two results. Elements from in order missing from preorder will be ignored. Elements from preorder missing from in order will result in an exception being thrown.Danielhttps://www.blogger.com/profile/07505997833685327219noreply@blogger.comtag:blogger.com,1999:blog-6373963829340632529.post-42383419816573994602011-11-21T19:02:09.918-02:002011-11-21T19:02:09.918-02:00I don't know scala, but what is the behavior o...I don't know scala, but what is the behavior of your program if the preorder(and/or in-order)list is ill-formed ?Gregory LEOCADIEhttp://www.gleocadie.netnoreply@blogger.comtag:blogger.com,1999:blog-6373963829340632529.post-11723957776058788852011-07-06T16:20:26.311-03:002011-07-06T16:20:26.311-03:00From Richard Carlsson erlang-questions%40erlang.or...From Richard Carlsson erlang-questions%40erlang.org. a lazy list:<br />LazyList :: () -> [] | [term() | LazyList]intraderhttps://www.blogger.com/profile/17373080023603096979noreply@blogger.comtag:blogger.com,1999:blog-6373963829340632529.post-8934272522124707972011-07-06T14:53:01.107-03:002011-07-06T14:53:01.107-03:00Elegant!
The realization of your understanding of ...Elegant!<br />The realization of your understanding of the problem is sublime Scalaintraderhttps://www.blogger.com/profile/17373080023603096979noreply@blogger.com