摘要: https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ 暴力求解会超时。有两种滑动窗口的方法,时间都差不多。 public int lengthOfLongestSubstring(String 阅读全文
posted @ 2020-02-05 21:12 超级学渣渣 阅读(129) 评论(0) 推荐(0) 编辑
摘要: https://leetcode-cn.com/problems/add-two-numbers/ ListNode root = new ListNode(0); ListNode cur = root; int retain = 0; while (l1!=null || l2!=null || 阅读全文
posted @ 2020-02-05 19:26 超级学渣渣 阅读(181) 评论(0) 推荐(0) 编辑
摘要: int [] two_num(int [] nums,int target){ HashMap<Integer, Integer> num_indx = new HashMap<Integer, Integer>(); int [] ans = new int [2]; for(int i=0;i< 阅读全文
posted @ 2020-02-05 17:04 超级学渣渣 阅读(98) 评论(0) 推荐(0) 编辑