To Be Developer

[LeetCode] 28. Implement strStr() 본문

알고리즘/LeetCode

[LeetCode] 28. Implement strStr()

Jeff Hwang 2019. 3. 24. 15:24
class Solution(object):
    def strStr(self, haystack, needle):
        """
        :type haystack: str
        :type needle: str
        :rtype: int
        """
        return haystack.find(needle)

https://leetcode.com/problems/implement-strstr/

'알고리즘 > LeetCode' 카테고리의 다른 글

[LeetCode] 557. Reverse Words in a String III  (0) 2019.03.24
[LeetCode] 561. Array Partition I  (0) 2019.03.24
[LeetCode] 367. Valid Perfect Square  (0) 2019.03.24
[LeetCode] 290. Word Pattern  (0) 2019.03.24
[LeetCode] 263. Ugly Number  (0) 2019.03.23