Implement rotated array binary search with duplicates | Microsoft