Mridul-1-Sharma / data_structures_algos

Contribute to this repository with valid pull request to Hacktoberfest 2022 and earn awesome swags & T-shirts. This is a beginner friendly Project.
MIT License
6 stars 27 forks source link

Added Search Element in a Rotated Sorted Array #44

Closed ashu2001-dina closed 1 year ago

ashu2001-dina commented 1 year ago

Problem Statement: There is an integer array nums sorted in ascending order (with distinct values). Given the array nums after the possible clockwise rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums. We need to search a given element in a rotated sorted array. Using Binary Search.