摘要:
1 class Solution { 2 public String reorganizeString(String S) { 3 if(S.length() == 0) return ""; 4 int[] arr = new int[26]; 5 int max = 0; 6 for(int i = 0; i... 阅读全文
摘要:
https://leetcode.com/problems/flatten-nested-list-iterator/discuss/80147/Simple-Java-solution-using-a-stack-with-explanation 阅读全文
摘要:
https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/discuss/87739/Java-Strict-O(N)-Two-Pointer-Solution window分别为1-26 阅读全文
摘要:
每个节点都要找有多少个 dfs对每个点找 阅读全文
摘要:
1 //dfs 2 class Solution { 3 public boolean checkValidString(String s) { 4 if(s.length() == 0) return true; 5 return dfs(s, 0, 0); 6 7 } 8 9 public ... 阅读全文