Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

How binary search is faster than linear search?

Revision en1, by Sirandrew2, 2020-07-05 21:03:34

We need a sorted array to perform a binary search in that case the time complexity already became greater than the linear search, so isnt linear search a better option in that case?

Tags #algorithms, #binary search, linear-search, time-complexity

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Sirandrew2 2020-07-05 21:03:34 228 Initial revision (published)