Interview Question
- -1of 1 vote
AnswersGive a Binary tree, write a function to return all the nodes from a given with a given distance. The function has three parameters root of tree, a given node, a given distance. For example,
- Danielnguyen0130 August 28, 2014 in United States
5
/\
4 7
/\
3 10
\
12
calling the function F(root,7,1) will return nodes 3,5,10
calling F(root,7,2) will return nodes 12,4| Report Duplicate | Flag | PURGE
Trees and Graphs
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Interview Type: In-Person
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.