a different approach using one queue is discussed. First insert the root and a null element into the queue. This null element acts as a delimiter. Next, pop from the top of the queue and add its left and right nodes to the end of the queue and then print at the top of the queue. Continue this process till the queues become empty.
Level order traversal line by line Set 3 (Using One Queue): https://www.geeksforgeeks.org/level-order-traversal-line-line-set-3-using-one-queue/