โ† Amazon questions

Prune BST

Filed under Amazon

Given the root of a binary search tree and two integers low and high, trim the tree so that all its elements lie in the range [low, high]. The resulting tree should still be a valid BST.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.