Domanda di colloquio di Amazon

Given a binary tree with only upwards (parent) node references, re-construct the tree adding in child references. You are given a list of leaf nodes (sorted in left to right order). Tricks include making sure to account for extremely unbalanced trees.

Risposte di colloquio

Anonimo

27 apr 2011

Recommend liberal use of queues

Anonimo

2 nov 2011

Can use a layer-by-layer recursive method.

Anonimo

1 mag 2011

Can you elaborate pls..