Solved problem 23 and added binary_search method for array