We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
思路很简单,从长串的头开始取子串长度的字符串,和子串比较,如果一样返回索引。
O(N)
O(1)