top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Given preorder traversal of a BST, how can we identify the leaf nodes without building the tree?

+1 vote
508 views
Given preorder traversal of a BST, how can we identify the leaf nodes without building the tree?
posted Feb 16, 2017 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

Given the root of a Binary Tree along with two integer values. Assume that both integers are present in the tree.
Find the LCA (Least Common Ancestor) of the two nodes with values of the given integers.
2 pass solution is easy. You must solve this in a single pass.

...