Sunday, October 30, 2005

Interesting problem with trees

This years DLPD exam had the following question

Given a binary tree and the following traversal information

In-Order : B P D Q K A C L T E F
Pre-Order: A K B D P Q L C F T E

construct the original tree.

Its an interesting problem, can you find the solution and back it up with logic - the problem solving approach you followed?

No comments:

Dynamic programming for the binomial coefficient

More fun things, this time with some visualisation of what happens when memoisation is used and what happens when we don't. I don'...