Google Interview Question for SDE1s
- 1of 1 vote
You are given a binary tree and a function shouldBeErased(node to check whether a node should be erased. Erase all nodes that should be erased in the binary tree and return the resulting forest in the form of an array of every root node.- ajay.raj November 13, 2017 in United States
What if this is a Binary Search Tree? (In this case you are given a list of nodes that should be erased instead of the function.) Does it make the problem simpler or more complicated or just the same?
| Report Duplicate | Flag | PURGE
Open Chat in New Window