7.Populating Next Right Pointers in Each Node
Given a binary tree. Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL.


Iterative Solution: (using Level Order Traversal)
Time Complexity: O(n) , Space Complexity: O(n)
Solution II :
Last updated
Was this helpful?