SAP Interview Question

How to print the values of a Binary Tree by level?

Interview Answer

Anonymous

Jul 13, 2022

Using a Queue: Add Node to queue Add it's left & right node Pop the node and print it Continue until queue is empty.