摘要: 思路很简单,一开始以右上角为焦点,若target大于焦点则往下走,否则往左走 阅读全文
posted @ 2016-07-08 18:37 Zhou_SYSU 阅读(107) 评论(0) 推荐(0)
摘要: ``` 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 阅读(93) 评论(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 阅读(93) 评论(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)