top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Randomize nodes of a Binary Tree without using any data structures?

+1 vote
346 views
Randomize nodes of a Binary Tree without using any data structures?
posted Jun 28, 2016 by anonymous

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

Similar Questions
+1 vote

How do you shuffle a binary tree without using any external data structures.
Note: With equal probability to every node.

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.

...