IT_World
[leetcode] 28. Implement strStr() 본문
class Solution:
def strStr(self, haystack: str, needle: str) -> int:
if len(needle) =="" :
return 0
else :
return haystack.find(needle)
'Coding test > programmers - single' 카테고리의 다른 글
[leetcode] 53. Maximum Subarray (0) | 2022.03.26 |
---|---|
[leetcode] 2. Add Two Numbers (1) | 2022.03.24 |
[leetcode] 26. Remove Duplicates from Sorted Array (0) | 2022.03.23 |
[leetcode] 27. Remove Element (0) | 2022.03.21 |
[프로그래머스/go lang- Level 1] 짝수와 홀수 (0) | 2021.09.08 |
Comments