Approach hintTry it first, then revealHide
Give each node a column and a row (left child col - 1, right child col + 1, both one row deeper), collect (col, row, value) triples, sort them, and group the values by column.
Give each node a column and a row (left child col - 1, right child col + 1, both one row deeper), collect (col, row, value) triples, sort them, and group the values by column.