teivah / algodeck

An Open-Source Collection of 200+ Flash Cards to Help You Preparing Your Algorithms & Data Structures Interview 💯

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

binary search in array contains overflow bug

mattrozak opened this issue · comments

better to calculate midpoint as

mid = lo + (hi-lo)/2;