Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 357 Bytes

README.md

File metadata and controls

19 lines (12 loc) · 357 Bytes

25.Implement strStr

Description

Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.

Example

Input: (haystack = 'hello'), (needle = 'll')
Output: 2

Input: (haystack = 'aaaaa'), (needle = 'bba')
Output: -1

From

LeetCode