So you might be aware of the algorithm of Binary Search, simple one right. But there is simple bug lies in Binary Search if we don’t care at all while writing the codes and most of the beginner does same. Here is Java Edition of Algorithm i have added .