Java
1 KMP algorithm
北京大学信息科学与技术学院《数据结构与算法》 之 KMP模式匹配算法 ©版权所有
1 | class Solution { |
Submission Detail
- 74 / 74 test cases passed.
- Runtime: 9 ms, faster than 26.57% of Java online submissions for Implement strStr().
- Memory Usage: 38.5 MB, less than 0.98% of Java online submissions for Implement strStr().
2 JDK String indexOf
1 | class Solution { |
Submission Detail
- 74 / 74 test cases passed.
- Runtime: 3 ms, faster than 99.58% of Java online submissions for Implement strStr().
- Memory Usage: 38.1 MB, less than 0.98% of Java online submissions for Implement strStr().