I want to know the code to print a binary tree level by level, I mean, if I have this tree:
5
/ \
3 2
/ \
4 6
I want to print it like: 5 3 2 4 6.
I know I need to do the tree depth method and I already did it, but I don't know what else to do.