binary search

Revision en1, by mac_n_cheese_pog, 2021-08-01 03:36:25

this is going to be a quick tutorial on binary search.

binary search is basically searching a number in O(logn).idk why someone make an algorithm just for searching a number lmao. for easy problems u can use lower_bound and upper_bound or just use binary search function so ez.harder problems require u to make some modifications on binary search so be sure to save the code in ur template so u can beat those cocky gm that tells u to google everything in solving speed.

binary search is kinda useless in higher leagues since nowadays its all about mathforces.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English mac_n_cheese_pog 2021-08-01 03:36:25 583 Initial revision (published)