Pairs summing to K in a BST with parent pointers
Filed under Josh Technology
The question
Given a BST whose nodes also have a parent pointer and an integer K, find all pairs of nodes whose values sum to K, in linear time and constant space.
No write-up yet. Related questions below have one.
Related Josh Technology questions
Collected from public candidate posts and coding forums. Updated Nov 2026.