public static void levelTraversal(TreeNode root) {
        if(root == null){
            return;
        }

        Queue<TreeNode> queue = new LinkedList<TreeNode>();
        queue.add(root);

        while (!queue.isEmpty()){
            TreeNode curNode = queue.remove();
            System.out.print(curNode.value + " ");
            if (curNode.leftNode != null){
                queue.add(curNode.leftNode);
            }
            if (curNode.rightNode != null){
                queue.add(curNode.rightNode);
            }
        }
    }