Updated the non-recursive version of binary search function. Also added a recursive version of binary search.