Given a binary tree, find out the minimum length sum path form root to leaf with sum S. What about finding minimum length sum path for BST? How does BST improve the search? For example, the min length path for sum S=13 in T1 is 2 (6–>7 not, 6–>4–>3). For T2 min length path for […]
Tag Archives: min path
Given two nodes in a binary tree with parent pointer. Find the min path from between two nodes. Note that root of the tree is not given Let’s start with an example as follows. 1 / \ 2 3 / / \ 4 5 6 \ / 7 8 Use parent pointer to find the […]