LeetCode 28. Implement strStr()
2022.07.18
問題
https://leetcode.com/problems/implement-strstr/
typescript
function strStr(haystack: string, needle: string): number {
if (needle === '') return 0
return haystack.indexOf(needle)
};
https://leetcode.com/problems/implement-strstr/
function strStr(haystack: string, needle: string): number {
if (needle === '') return 0
return haystack.indexOf(needle)
};