Search in rotated sorted array

How do we handle the case when duplicate elements are present and we need to return the first occurence of the target element ?

hello @nidhigupta847
logic will remain same.