摘要:
class Solution { public int movesToMakeZigzag(int[] nums) { int temp1[] = new int[nums.length]; int temp2[] = new int[nums.length]; for (int i = 0; i 阅读全文
摘要:
class Node { final static int the_maxsize = 26; Node[] list = new Node[the_maxsize]; char data; boolean isEnd = false; //用isEnd 代替isSelf 节约空间 } class 阅读全文
摘要:
暴力 class Solution { public int lengthOfLongestSubstring(String s) { int the_max = 0; HashSet hs = new HashSet(); for (int i = 0; i hs = new HashSet(); 阅读全文
摘要:
class Solution { public int numUniqueEmails(String[] emails) { HashSet hs = new HashSet(); for (int i = 0; i hs = new HashSet(); for (String i : email 阅读全文
摘要:
今天项目里遇到以"." 、"\"、“|”分割字符串,直接用"." 、"\"、“|”无法分割,因为"." 、"\"、“|”是特殊字符,需要转义,"\\." 、"\\\"、“\\|”。 精简~ class Solution { public int compareVersion(String s1, S 阅读全文
摘要:
 ``` class Solution { public String reverseWords(String s) { StringBuffer ans = new StringBuff... 阅读全文