You can add NULL before while loop in the queue and check the condition whether the null is present or not, if it is present, print new line and add another NULL inside the queue.
Thank You Tushar sir, Its helping me for my interview preparation with companies mostly concerned with DS and algo. Do you have any tips for preparation, do share please!!
Thanks for such a nice and comprehensive tutorial sir. I request you if you can upload "Graph Data Structure" videos as well including graph traversal algorithms like Prim's algorithm, Kruskal's algorithm, many more. There are many videos on RU-vid on Graph topic but I didn't find any with programs(code). So if you find some time, please make videos on these. Regards...