1. Problem Statement (Simple Explanation) You’re given: A rotated array nums that was originally sorted in non-decreasing order. The array may contain duplicates . An integer target. You must return: true if target exists in nums false otherwise. Rotation: Original sorted: e.g. [0,1,2,4,4,4,5,6,6,7] Rotated at pivot k: e.g. [4,5,6,6,7,0,1,2,4,4] Goal: Decrease operations as much as possible (use a modified binary search ). 2. Examples Example 1: Input: nums = [2,5,6,0,0,1,2], target = 0 0 is in the array. Output: true Example 2: Input: nums = [2,5,6,0,0,1,2], target = 3 3 is not in the array. Output: false 3. Approach – Modified Binary Search (with duplicates) This is similar to LeetCode 33 but now nums may contain duplicates . Without duplicates: At each step we could tell which half is sorted and then decide which side to search. With duplicates, ...