dsjslib
dsjslib copied to clipboard
Return value of BST.put() depends on state
The return value of BinarySearchTree.put()
differs depending on the state of the tree and is not
documented.
In case of the first insertion the tree instance is returned whereas for subsequent insertions a structure like this is returned:
{
put: [Function],
node: [Object]
}