← Amazon questions

Remove root to leaf paths with sum less than K

Filed under Amazon

Given a binary tree and an integer K, delete all nodes that are part of root-to-leaf paths having a sum less than K. A node should only be kept if it lies on at least one path from root to leaf whose…

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.