随笔分类 -  Leetcode

摘要:``` public int lengthOfLongestSubstring(String s) { int max = 1; int start = 0; int end = 1; int len = s.length(); if(len == 0) return 0; ... 阅读全文
posted @ 2016-07-08 16:03 Zhou_SYSU 阅读(94) 评论(0) 推荐(0)
摘要:``` public ListNode addTwoNumbers(ListNode l1, ListNode l2) { if(l1 == null) return l2; if(l2 == null) return l1; ListNode head = new ListNode(0); ListNod... 阅读全文
posted @ 2016-07-08 15:04 Zhou_SYSU 阅读(95) 评论(0) 推荐(0)
摘要:``` public int[] twoSum(int[] nums, int target) { HashMap map = new HashMap(); int[] defaultResult = {0,0}; int len = nums.length; for(int i = 0;i 阅读全文
posted @ 2016-07-08 14:49 Zhou_SYSU 阅读(79) 评论(0) 推荐(0)