In this post we are learning about how to print specific level (given level) BST nodes.Assume that following data are inserted on tree [476, 467, 584, 421, 475, 501, 900, 413, 432, 530, 533].
Try it Yourself
Print level 2 data of this tree.
Level and data of given binary search tree is.
Another example: print level 3
Time complexity of this program O(n)
In this execution process not imagination all steps. below link click and view how to insert bst node, how to show all bst node and how to print given level BST node .
C program to print given level. Recursive approach.