LeetCode
Flip Binary Tree To Match Preorder Traversal
Click
here
for an explanation.