class Node { int data; Node left, right; public Node(int item) { data = item; left = right = null; } } public class LevelOrderTraversal { // Root of the Binary Tree Node root; public LevelOrderTraversal() { root = null; } /* function to print level order traversal of tree*/ void printLevelOrder() { int h = height(root); int i; for (i=1; i<=h; i++) printGivenLevel(root, i); } /* Compute the "height" of a tree -- the number of nodes along the longest path from the root node down to the farthest leaf node