摘要: 递归: if( n == 1) return "1"; String s = countAndSay(n-1); char[] c = s.toCharArray(); int count = 1; String res = ""; for(int i = 0; i < c.length-1; i+ 阅读全文
posted @ 2020-12-03 11:04 Amazon_Tina 阅读(65) 评论(0) 推荐(0)
摘要: set和数组之间的转换 int[] nums = {0,0,1,1,1,2,2,3,3,4};Set<Integer> set = new TreeSet<Integer>();//数组转setfor(int i = 0; i < nums.length; i++){ set.add(nums[i] 阅读全文
posted @ 2020-11-30 13:48 Amazon_Tina 阅读(1520) 评论(0) 推荐(0)