Iterate until queue is empty
while ( len > 0 ) { TreeNode temp = que . Peek ( ) ; que . Dequeue ( ) ; Console . Write ( temp . val + " ▁ " ) ; if ( temp . left != null ) que . Enqueue ( temp . left ) ; if ( temp . right != null ) que . Enqueue ( temp . right ) ; len -= 1 ; } Console . Write ( " STRNEWLINE " ) ; } Console . Write ( " STRNEWLINE " ) ; }