I posted a problem in Problem with Trees. The answer is posted below, use the Euler's tour to verify. If it is not correct, I know where I would be losing marks in the exam.
Subscribe to:
Post Comments (Atom)
Ranking and Unranking permutations
I've been a big fan of Skiena's Algorithm Design Manual , I recently found my first edition of the book (although I own the third ed...
-
(Photo from http://content-usa.cricinfo.com/indvaus2008/content/current/player/28114.html) Dravid's dismal form continues in test crick...
-
I've been reading up on Fast Fourier Transform (FFT) from several books on algorithms that I have, TCLR, Tamassia, Sahni, Numerical Rec...
-
The book is almost out there . There is code and selected solutions as well. The book is supposed to be in full colour from what I heard....
2 comments:
How can your solution be incorrect, man?
BTW, I verified it and it seems ok.
Gops.
The really interesting thing is that B is the leftmost leaf -- as per inorder and P is not its parent, so it took a long time to figure out the correct answer in the exam.
Thanks for verifying it for me! I will get some marks for sure!
Post a Comment