Skip to content

Commit 56f7219

Browse files
committed
feat: Solve search-in-rotated-sorted-array problem
1 parent 775b2d0 commit 56f7219

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution:
2+
def search(self, nums: List[int], target: int) -> int:
3+
return nums.index(target) if target in nums else -1

0 commit comments

Comments
 (0)