Note

The wasBinarySearchTreeMaximum function takes as arguments:

and returns the maximal value in the binary search tree.

Code

This script was tested and works on OpenSim version 0.7.5!

///////////////////////////////////////////////////////////////////////////
//    Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3    //
///////////////////////////////////////////////////////////////////////////
string wasBinarySearchTreeMaximum(list BST, string root) {
    string node = wasBinaryTreeRight(BST, root);
    if(node == "") return root;
    return wasBinarySearchTreeMaximum(BST, node);
}