dsjslib icon indicating copy to clipboard operation
dsjslib copied to clipboard

Return value of BST.put() depends on state

Open akloeber opened this issue 9 years ago • 0 comments

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]
}

akloeber avatar Nov 22 '15 19:11 akloeber