Skip to content

Commit

Permalink
Create SearchInRotatedSortedArray.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithNavdeep authored Oct 31, 2022
1 parent 79940f3 commit bc84e62
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions SearchInRotatedSortedArray.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class Solution {
public:
bool search(vector<int>& nums, int target) {

for(int i=0;i<nums.size();i++)
{
if(nums[i]==target){
return true;
}

}
return false;
}
};

0 comments on commit bc84e62

Please sign in to comment.