Binary search is an efficient algorithm that finds an item in a sorted list by repeatedly dividing the search interval in half, starting from the middle; for a list of 1 million entries, it requires at most 20 steps, and for 1 billion entries, only 30 steps, but it requires the list to be sorted to work effectively.
深度探索
先修知识
- 暂无数据。
后续步骤
- 暂无数据。
深度探索
Binary search finds 1 in a million in 20 steps. Here's how.本站添加:
You type a name into a search box. The app finds it instantly from a list of 1 million entries. How?
It does not check every name. It starts in the middle. If your name comes before that midpoint alphabetically, everything after is gone. Half the list, one step.
It jumps to the middle of what remains.
Half again, one step.
This is binary search. Every single step cuts the remaining candidates in half. 1 million entries takes at most 20 steps.
1 billion takes 30.
The catch, the list must be sorted.
Without sorting, the middle tells you nothing. With sorting, it tells you everything.
Full breakdown on the channel.
相关推荐
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
Re: 🗣️📍theprophedu📍2026 GST 103 CLASS (E-EXAM REVISION)
theprophedu
636 views•2026-06-04
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Instagram accounts got PWNed
EricParker
13K views•2026-06-03











