摘要: 1 class Solution { 2 public int longestValidParentheses(String s) { 3 if(s.length() == 0) return 0; 4 char[] arr = s.toCharArray(); 5 Stack stack = new Stack(); 6 ... 阅读全文
posted @ 2018-10-27 23:59 jasoncool1 阅读(141) 评论(0) 推荐(0) 编辑
摘要: stringbuilder加入到首位的话用insert 阅读全文
posted @ 2018-10-27 10:52 jasoncool1 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution { 2 public String customSortString(String S, String T) { 3 if(S.length() == 0 || T.length() == 0) return T; 4 int[] count = new int[26]; 5 for(int i ... 阅读全文
posted @ 2018-10-27 06:56 jasoncool1 阅读(92) 评论(0) 推荐(0) 编辑