← Amazon questions

Implement locking in a binary tree

Filed under Amazon

Implement locking and unlocking operations in a binary tree. A node can be locked or unlocked only if all its ancestors and descendants are currently unlocked. You are permitted to modify the tree…

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.