JavaScript-Data-Structure/数据结构08-树/01_二叉搜索树.html ---remove
littleant9414 opened this issue · comments
` bst.remove(9)
bst.remove(7)
bst.remove(15)
resultString = ''
bst.postOrderTraversal(function(key){
resultString += key + ' '
})
alert(resultString)`
-
可以請問以上我輸出到chrome 為什麼出現
Uncaught RangeError: Maximum call stack size exceeded at BinarySearchTree.BinarySearchTree.postOrderTraversalNode
的錯誤? -
如果直接
alert(bst.remove(9)); alert(bst.remove(7)); alert(bst.remove(15));
就會出現 undefined undefined false 的錯誤,why?