Two Sum on a binary tree.
Unlock detailed company stats for this questionUpgrade
Solve with brute force first, then optimize with a map in the follow-up. Second part: if the tree is a BST and a map is not allowed, how would you solve it? (Solved after a hint.)
Expect follow-ups like
- If the tree is a BST and you cannot use a map, how would you solve it?
Format · Amazon SDE onsite round 2.
Community answers
No answers contributed by the community yet.
Related questions
Maximum Level Sum of a Binary Tree.Re-root a binary tree.Binary Tree Maximum Path Sum.Related courses

Course

Course
Course
