Update binary tree (JS).

pull/158/head^2
Yudong Jin 2 years ago
parent ee6842dc9c
commit 22314be33c

@ -1,6 +1,4 @@
> Tip: If this PR is not related to the coding or code translation, please ignore the checklist. If this PR is related to coding or code translation, please fill out the checklist.
### Checklist
- [ ] I've tested the code and ensured the outputs are the same as the outputs of reference codes. - [ ] I've tested the code and ensured the outputs are the same as the outputs of reference codes.
- [ ] I've checked the codes (formatting, comments, indentation, file header, etc) carefully. - [ ] I've checked the codes (formatting, comments, indentation, file header, etc) carefully.

@ -29,31 +29,24 @@ $$
首先,我们先采用“双闭区间”的表示,在数组 `nums` 中查找目标元素 `target` 的对应索引。 首先,我们先采用“双闭区间”的表示,在数组 `nums` 中查找目标元素 `target` 的对应索引。
=== "Step 1" === "Step 1"
![binary_search_step1](binary_search.assets/binary_search_step1.png) ![binary_search_step1](binary_search.assets/binary_search_step1.png)
=== "Step 2" === "Step 2"
![binary_search_step2](binary_search.assets/binary_search_step2.png) ![binary_search_step2](binary_search.assets/binary_search_step2.png)
=== "Step 3" === "Step 3"
![binary_search_step3](binary_search.assets/binary_search_step3.png) ![binary_search_step3](binary_search.assets/binary_search_step3.png)
=== "Step 4" === "Step 4"
![binary_search_step4](binary_search.assets/binary_search_step4.png) ![binary_search_step4](binary_search.assets/binary_search_step4.png)
=== "Step 5" === "Step 5"
![binary_search_step5](binary_search.assets/binary_search_step5.png) ![binary_search_step5](binary_search.assets/binary_search_step5.png)
=== "Step 6" === "Step 6"
![binary_search_step6](binary_search.assets/binary_search_step6.png) ![binary_search_step6](binary_search.assets/binary_search_step6.png)
=== "Step 7" === "Step 7"
![binary_search_step7](binary_search.assets/binary_search_step7.png) ![binary_search_step7](binary_search.assets/binary_search_step7.png)
二分查找“双闭区间”表示下的代码如下所示。 二分查找“双闭区间”表示下的代码如下所示。

Loading…
Cancel
Save