greyireland / greyireland/algorithm-pattern
文章中有一处代码有缺陷
Open
- Dominant language
- Go
- Stars
- 15.5k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
文件地址:algorithm-pattern/introduction/quickstart.md
问题strStr,问题代码:
```
func strStr(haystack string, needle string) int {
if len(needle) == 0 {
return 0
}
....
}
```
如果子串长度为0的话返回0有歧义,误认为子串起始地址为0,我觉得改为负数之类的更好。
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.