Function to print the level order traversal of the Binary tree
static void print ( Node root ) { Queue < Node > Q = new LinkedList < Node > ( ) ; Q . add ( root ) ; while ( Q . size ( ) > 0 ) { Node temp = Q . peek ( ) ; Q . remove ( ) ; System . out . print ( temp . data ) ; if ( temp . left != null ) Q . add ( temp . left ) ; if ( temp . right != null ) Q . add ( temp . right ) ; } }