Change the Root of a Binary Tree
Walk from the leaf up its old parent chain, reversing each parent link and keeping every off-path child attached.
Walk from the leaf up its old parent chain, reversing each parent link and keeping every off-path child attached.