← Amazon questions

Top View of binary tree

Filed under Amazon · Also reported at APT Portfolio, Dailyhunt, Editorialist YX, EPAM, Oracle, Qualcomm, Walmart

Given a binary tree, print or return the top view of the binary tree, which is the set of nodes visible when the tree is viewed from the top, ordered from left to right by horizontal distance.

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.