← Amazon questions

Kth distance nodes, cousin sum, and row-col sorted matrix search

Filed under Amazon

Solve three tasks: 1) Find all nodes at distance K from a target node in a binary tree. 2) Calculate the sum of cousins of a node. 3) Search for a target in a row-wise and column-wise sorted matrix.

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.