doc: add binary search docs
This commit is contained in:
1 parent
16f7be1f28
commit
2767f18134
1 file changed
+6
-1
@@ -1,5 +1,10 @@
|
||||
---
|
||||
title: Binary Search(二分算法)
|
||||
title: Binary Search(二分查找)
|
||||
date: 2021-07-07 07:42:06
|
||||
tags: 算法
|
||||
---
|
||||
|
||||
### 什么是二分查找
|
||||
二分搜索是一种算法;它的输入是一个已排序的元素列表。如果一个元素查找在列表中,二分查找返回它所在的位置。否则,二进制搜索返回**null**。
|
||||
|
||||
这里有一些二进制搜索的例子: 假设你在玩一个数字猜谜游戏,我会告诉你你的数字是高、低还是正确。
|
||||
Reference in new issue
Block a user