# 28. Implement strStr()
# https://leetcode.com/problems/implement-strstr/
import re
class Solution:
    def strStr(self, haystack: str, needle: str) -> int:
        resInfo = re.search(needle, haystack)
        res = resInfo.start() if resInfo else -1
        return res
    
    haystack = "hello"
    needle = "ll"
    print(strStr("", haystack, needle))
    haystack = "aaaaa"
    needle = "bba"
    print(strStr("", haystack, needle))
c65f5bd32d8988965b4612bdcb6be5301d2faafb
<mask token>


class Solution:
    <mask token>
    <mask token>
    <mask token>
    print(strStr('', haystack, needle))
    <mask token>
    <mask token>
    print(strStr('', haystack, needle))

<mask token>


class Solution:

    def strStr(self, haystack: str, needle: str) ->int:
        resInfo = re.search(needle, haystack)
        res = resInfo.start() if resInfo else -1
        return res
    <mask token>
    <mask token>
    print(strStr('', haystack, needle))
    <mask token>
    <mask token>
    print(strStr('', haystack, needle))

<mask token>


class Solution:

    def strStr(self, haystack: str, needle: str) ->int:
        resInfo = re.search(needle, haystack)
        res = resInfo.start() if resInfo else -1
        return res
    haystack = 'hello'
    needle = 'll'
    print(strStr('', haystack, needle))
    haystack = 'aaaaa'
    needle = 'bba'
    print(strStr('', haystack, needle))

import re


class Solution:

    def strStr(self, haystack: str, needle: str) ->int:
        resInfo = re.search(needle, haystack)
        res = resInfo.start() if resInfo else -1
        return res
    haystack = 'hello'
    needle = 'll'
    print(strStr('', haystack, needle))
    haystack = 'aaaaa'
    needle = 'bba'
    print(strStr('', haystack, needle))

# 28. Implement strStr()
# https://leetcode.com/problems/implement-strstr/
import re
class Solution:
    def strStr(self, haystack: str, needle: str) -> int:
        resInfo = re.search(needle, haystack)
        res = resInfo.start() if resInfo else -1
        return res
    
    haystack = "hello"
    needle = "ll"
    print(strStr("", haystack, needle))
    haystack = "aaaaa"
    needle = "bba"
    print(strStr("", haystack, needle))