In java, how can we traverse a binary search tree level by level ?
You need a queue for that: first you push the root and you repeatedly pop a
current node, process it and push its children to that queue again; all that
until the queue is empty.
You'd do it the same in C, C++, Java, SmallTalk or whatever.
kind regards,
Jos