2023-09-25发表2024-04-10更新算法几秒读完 (大约97个字)算法基础 1. 常用函数 123456789101112131415161718192021222324// 字符串相关String s;// 字符串长度int length = s.length();// 获取指定index的字符char c = s.charAt(index);// 字符串转char数组char[] cList = s.toCharArray();// char数组转字符串String s1 = new String(c);// String数组转ListString[] s2 =new String[] {"hello", "world"};List<String> l2 = Arrays.asList(s2);// List转String数组String[] s3 = l2.toArray(new String[0]);// 获取子字符串String childString = s.substring(startIndex, endIndex); 算法基础http://mercurius-lei.github.io/2023/09/25/algorithm_base/作者lei.ch1941发布于2023-09-25更新于2024-04-10许可协议#todo算法