private static void customPreOrder(BinaryTreeNode<Integer> root) {
        if(root == null) {
            return ;
        }

        // check if root's data is zero,
        if(root.data.compareTo(0) == 0) {
            // if left child is non zero . swap the value of root and left child and recurse on left subtree (typical preorder)
            if((root.left != null && root.left.data.compareTo(0) != 0)) {
                int temp = root.data;
                root.data = root.left.data;
                root.left.data = temp;
                customPreOrder(root.left);
            } else if((root.right != null && root.right.data.compareTo(0) != 0)) {
                // swap right child and recurse
                int temp = root.data;
                root.data = root.right.data;
                root.right.data = temp;
                customPreOrder(root.right);
            }
        }
    }