← Amazon questions

Find pairs in a BST that sum to a key value

Filed under Amazon

Given a Binary Search Tree and a target sum, design an algorithm to find all pairs of node values whose sum equals the key using an in-place approach without extra linear space for array conversion.

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.