• Finds the successor of a given element in the splay tree

    The successor is the smallest element greater than the given value. This function uses a more comprehensive approach to find successors.

    Parameters

    • value: any

      the value to find the successor of

    • tree: SplayTree<any>

      the tree to search in

    Returns {
        tree: SplayTree<any>;
        value: any;
    }

    object containing the successor value and the splayed tree