Optiver interview question

On trees, traversals, and validation