โ† Amazon questions

Design unlimited children tree and print levels

Filed under Amazon

Design a tree data structure where a node can have an arbitrary number of children (N-ary tree), and write an algorithm to print each level of the tree on a separate line.

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.