To find an element in the array using bianry search method