Binary Search | When to use <= and when to use <

Revision en1, by ramentaneja, 2023-09-17 13:41:02

Hello everyone,

I have been using Binary Search for a while, but it still confuses me as to when I should use <= and when I should use < and how I should be updating my low and high variables accordingly.

I am not sure if this has already been answered, I was unable to find an answer that solved my doubt regarding how to update low and high variables.

It's just something I am struggling to wrap my head around, any help regarding this would be highly appreciated. Cheers!

Tags binary search

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ramentaneja 2023-09-17 13:41:02 546 Initial revision (published)