Binary Search Algorithm – Iterative and Recursive Implementation
Given a sorted array of n integers and a target value, determine if the target exists in the array or not in logarithmic time using the binary search algorithm. If target exists in the array, print the index of it.