This website requires JavaScript.
Explore
Help
Sign In
Discharge7443
/
Hexo-Butterfly
Watch
1
Star
0
Fork
0
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
64e6ee1c213a62fbcc8532ac89f36a764d7a2b5a
Hexo-Butterfly
/
source
/
_posts
/
Binary-Search.md
T
Leon Xu
64e6ee1c21
doc: update tags
2021-07-07 10:48:01 -07:00
578 B
Raw
Blame
History
title, date, tags
title
date
tags
Binary Search(二分搜索)
2021-07-07 10:31:20
算法
二分搜索
什么是二分查找算法?
二分搜索是一种算法;它的输入是一个已排序的元素列表。如果你要找的元素在这个列表中,二分查找返回它所在的位置。否则,二进制搜索返回
null
。
一些二分搜索的坏例子:
下面是一些二分搜索的例子:
假设你在玩一个数字猜谜游戏,我会告诉你你的数字是高、低还是正确。
Reference in new issue
View Git Blame
Copy Permalink