Givenatree,rearrangethetreein in-order sothattheleftmostnodeinthetreeisnowtherootofthetree,andeverynodehasnoleftchildandonly1rightchild.
Example1:
Input:[5,3,6,2,4,null,8,1,null,null,null,7,9]
5
/
36
/\
248
//
179
Output:[1,null,2,null,3,null,4,null,5,