随笔分类 - 一日一算
摘要:1 public static int lengthOfLongestSubstring(String s) { 2 if(s.length()<=1){ 3 return s.length(); 4 } 5 HashMap<Character,Integer> map =new HashMap<>
阅读全文
摘要:public int[] twoSum1(int[] nums, int target) { int first; int second; int a; int b=1; //外循环 假设第一个值为索引为a out: for (a = 0; a < nums.length; a++) { first
阅读全文
摘要:1 public ListNode myMethod(ListNode l1, ListNode l2){ 2 // 代表位数 3 int e=10; 4 // 连个单链表所做成的数字 5 int ln1=0; 6 int ln2=0; 7 // 通过循环获得两个单链表所表示的整数 8 while
阅读全文
摘要:1 public static int partitionDisjoint(int[] A) { 2 //创建一个链式集合来充当左数组 3 LinkedList<Integer> list = new LinkedList(); 4 //创建一个判断标记 5 boolean flag = true;
阅读全文


浙公网安备 33010602011771号