Optiver Interview Question

On trees, traversals, and validation