Fork me on GitHub
摘要: 遍历中心点 然后像两边扩出去 class Solution { public String longestPalindrome(String s) { String ans =""; for(int i = 0 ; i =0&&y=0&&y 阅读全文
posted @ 2019-08-08 16:01 cznczai 阅读(145) 评论(0) 推荐(0)
摘要: class Solution { public int numUniqueEmails(String[] emails) { HashSet hs = new HashSet(); for (int i = 0; i hs = new HashSet(); for (String i : email 阅读全文
posted @ 2019-08-08 14:35 cznczai 阅读(180) 评论(0) 推荐(0)
摘要: 今天项目里遇到以"." 、"\"、“|”分割字符串,直接用"." 、"\"、“|”无法分割,因为"." 、"\"、“|”是特殊字符,需要转义,"\\." 、"\\\"、“\\|”。 精简~ class Solution { public int compareVersion(String s1, S 阅读全文
posted @ 2019-08-08 12:45 cznczai 阅读(98) 评论(0) 推荐(0)