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
Approach :- Store the pointer to root in some variable now perform bfs on the tree and swap left and right children and now return the varible that stored the pointer to root