Amazon interview question

Print out a tree in horizontal order.

Interview Answer

Anonymous

1 May 2022

I added an extra variable as a key to a tree data structure then stored that tree node in a hashmap.