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
cc7dc7c9bc23c70cd0e904a6a3f3f9fd64ad0041
Hexo-Butterfly
/
source
/
_posts
/
Binary-Search.md
T
Leon Xu
cc7dc7c9bc
file: add 二分查找工作原理
2021-07-07 10:58:58 -07:00
550 B
Raw
Blame
History
title, date, tags
title
date
tags
Binary Search(二分搜索又称二分查找)
2021-07-07 10:31:20
算法
二分搜索
二分查找
什么是二分查找?
二分搜索(查找)是一种算法;它的输入是一个已排序的元素列表。如果你要找的元素在这个列表中,二分查找返回它所在的位置。否则,二进制搜索返回
null
。
下面的示例说明了二分查找的工作原理。我随便想一个1~100的数字。
Reference in new issue
View Git Blame
Copy Permalink