mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-21 23:16:41 +08:00
Fix a comment in binary_search_tree code
This commit is contained in:
@ -71,7 +71,7 @@ function insert(num: number): void {
|
||||
cur = cur.left as TreeNode; // 插入位置在 cur 的左子树中
|
||||
}
|
||||
}
|
||||
// 插入节点 val
|
||||
// 插入节点
|
||||
let node = new TreeNode(num);
|
||||
if (pre!.val < num) {
|
||||
pre!.right = node;
|
||||
|
Reference in New Issue
Block a user