In java, how can we traverse a binary search tree level by level ?
Level by level traversal of BST
Collapse
X
-
Tags: None
-
Originally posted by Brij kishorIn java, how can we traverse a binary search tree level by level ?
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
Comment