二叉搜索树 BST 算法动画

BST + Code Flow
速度 1.0x
普通节点 当前比较 插入节点 查找成功 删除节点
中序遍历:等待开始
载入 BST 后,可执行插入、查找、删除操作。
代码执行流
1 function bstOperation(root, value) {
2 if (root == null) createNode(value);
3 while (root != null) {
4 if (value == root.value) return root;
5 if (value < root.value) {
6 root = root.left;
7 } else {
8 root = root.right;
9 }
10 }
11 insert / delete / search result;
12 }
访问路径
路径为空
执行日志