Problem 971 · Medium
Walk the tree in preorder, flipping a node whenever its left child is not the next voyage value.
Open the interactive visualisation