Binary Search Algorithm Explained with Code Examples in C and JavaScript