# or -1 if needle is not part of haystack. # This is a great question to ask during an interview. # For the purpose of this problem, we will return 0 when needle is an empty string. # This is ...
在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 -1。
Some results have been hidden because they may be inaccessible to you
Show inaccessible results