刷题打卡
John_Zaey
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode刷题打卡群 Week5
面试题 08.06. 汉诺塔问题class Solution { public void hanota(List<Integer> A, List<Integer> B, List<Integer> C) { if(A==null) return; recurse(A, B, C, A.size()); } public void recurse(List<Integer> src, List<原创 2021-04-06 15:57:26 · 221 阅读 · 0 评论 -
LeetCode刷题打卡群 Week4
本周两题均可使用双端队列剑指 Offer 59 - I. 滑动窗口的最大值class Solution { public int[] maxSlidingWindow(int[] nums, int k) { if(nums==null || nums.length<=0) return new int[0]; int start = 0, end = 0; int[] res = new int[nums.length-k+1];原创 2021-03-31 23:30:57 · 273 阅读 · 0 评论 -
LeetCode刷题打卡群 Week2
2. 两数相加public ListNode addTwoNumbers(ListNode l1, ListNode l2) { ListNode dumbHead = new ListNode(-1); ListNode tmp = dumbHead; int advance = 0; while(l1!=null&&l2!=null) { int sum = l1.val + l2.val + advance; if(su原创 2021-03-21 14:17:11 · 326 阅读 · 1 评论
分享