Added binary search modified for non-distonct arrays