leetcode-28-Implement strStr()

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zem_nezer/article/details/85047630

A clearly problem, just compare the element when element-wise. When the needle pointer get the end, return it. If do not meet at the end, return -1. A stupid point is that the problem treat the needle empty as a valid size, and we can return 0. I think it is unclear and unreasonable.

猜你喜欢

转载自blog.csdn.net/zem_nezer/article/details/85047630