摘要:
KMP暴力搜索 1 class Solution { 2 3 public int strStr(String haystack, String needle) { 4 // 获取 haystack 和 needle 的长度 5 int n = haystack.length(), m = need 阅读全文
摘要:
简单 3 public class Main { 4 public static void main(String[] args) { 5 String s = "abcdefg"; 6 int count=3; 7 char[] charArray = s.toCharArray(); 8 int 阅读全文
摘要:
index工作指针 left、right边界指针 1 class Solution { 2 public String reverseWords(String s) { 3 char[] string=s.toCharArray(); 4 int left=0; 5 int right=s.leng 阅读全文