随笔分类 - Leetcode
摘要:``` public int lengthOfLongestSubstring(String s) { int max = 1; int start = 0; int end = 1; int len = s.length(); if(len == 0) return 0; ...
阅读全文
摘要:``` public ListNode addTwoNumbers(ListNode l1, ListNode l2) { if(l1 == null) return l2; if(l2 == null) return l1; ListNode head = new ListNode(0); ListNod...
阅读全文
摘要:``` public int[] twoSum(int[] nums, int target) { HashMap map = new HashMap(); int[] defaultResult = {0,0}; int len = nums.length; for(int i = 0;i
阅读全文

浙公网安备 33010602011771号