public BinaryTreeNode treeSuccessor(BinaryTreeNode n) {
        BinaryTreeNode runner = n;
        if (n.right == null) {
            while (runner.parent.right == runner) {
                runner = runner.parent;
            }
            return runner.parent;
        }
        return minmum(n.right);
    }