Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
CS foundations
/
Sorting and searching
You need the first matching record from a small unsorted array, and this query runs once.…
from Sorting and searching
Node 24
beginner
1 min
You need the first matching record from a small unsorted array, and this query runs once. What is the best starting strategy?
Scan in input order and stop at the first match.
Sort the entire array, then run binary search.
Build both a hash index and a balanced tree.
Check
Ask AI about this kata
Report an error
next kata
What does this program print?
Predict the output
A new version is available
Reload