You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//The approach is very simple, to do a level order traversal and if it is not the last node in level order, then make curr->next=q.front() as when curr node is
//popped out, root's right child is at the top of the queue. But, if it is the last node, then make it's next null.