public static void levelTraverse(TreeLinkNode root) {
        if (root == null) {
            return;
        }
        
        LinkedList<TreeLinkNode> queue = new LinkedList<TreeLinkNode>();
        queue.addLast(root);
        
        while (! queue.isEmpty()) {
            LinkedList<TreeLinkNode> tmp = new LinkedList<TreeLinkNode>();
            while (! queue.isEmpty()) {
                TreeLinkNode t = queue.removeFirst();
                System.out.printf("%d ", t.val);
                if (t.left != null) {
                    tmp.addLast(t.left);
                }
                if (t.right != null) {
                    tmp.addLast(t.right);
                }
            }
            System.out.println();
            
            queue.addAll(tmp);
        }
    }