LoginSignup
2
0

More than 3 years have passed since last update.

81. Search in Rotated Sorted Array II

Last updated at Posted at 2019-11-25

Problem

problem

Submission

submission.py
class Solution:    
    def search(self, nums: List[int], target: int) -> bool:
        if nums.count(target) > 0:
            return True 
        else:
            return False

targetの有無の判定だけでOKですね。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0