来源:《数据结构:使用C++语言描述》
代码:
参考:https://blog.csdn.net/scgaliguodong123_/article/details/49148017
1 | public class SimpleMatch { |
// 测试1
2
3
4
5
6
7 public static void main(String[] args) {
SimpleMatch test = new SimpleMatch();
System.out.println(test.Index("goodgoogle", "google", 0)); //4
System.out.println(test.Index("goodgoogle", "google", 2)); //4
}
}