I can understand you cuz I have been there few months ago 
This question has 4-5 big parts. One can’t tackle all of them if they don’t have the pre-requisites.
So, I would suggest you to practice 4-5 problems on flattening of tree into an array from here :-
Then only come back to this editorial.
5 Likes