📣 Back to School开学季 - VIP通行证5折优惠!蓝莓、Offer多多同步优惠
楼主: xsijg8
跳转到指定楼层
上一主题 下一主题
收起左侧

[第二期活动] 在职刷题打卡,目标工作日一天2题,周末一天5题

🔗
Sato123 2019-8-24 09:34:30 | 只看该作者
全局:
#Day_22

Finished * 2, 水一道
Divide Two Integers
Merge Two Sorted Lists
回复

使用道具 举报

🔗
darktef 2019-8-24 10:39:38 | 只看该作者
全局:
Day 17
349 & 350, intersection of two arrays, hash table / two pointer
485, 487, 1004 max consecutive ones, sliding window
53, maximum subarray, the max is could either end at this point or start at this point.
238, product of array except self, two pass
278, first bad version, binary search
回复

使用道具 举报

🔗
 楼主| xsijg8 2019-8-24 14:25:09 | 只看该作者
全局:
day 20
Populating Next Right Pointers in Each Node
Binary Tree Right Side View
回复

使用道具 举报

🔗
xxJay 2019-8-25 02:22:59 | 只看该作者
全局:
#Day_9

1165. single-row keyboard
1166. design-file-system
1167 minimum cost to connect sticks
回复

使用道具 举报

🔗
Sato123 2019-8-25 08:08:23 | 只看该作者
全局:
#Day_23

Finished * 2
Insert Interval
Jump Game II
回复

使用道具 举报

🔗
zixinhua 2019-8-25 12:16:40 | 只看该作者
全局:
day 2
merge overlapping intervals
sum of two values
reversed a singly-linked list
回复

使用道具 举报

🔗
coldcoffee.jp 2019-8-25 12:21:41 | 只看该作者
全局:
打卡Day 5 前两天在旅行就没有刷题

309. Best Time to Buy and Sell Stock with Cooldown - DP 从O(n)时间O(n)空间优化到O(n)时间O(1)时间, leveraging the fact that each state only depends on the previous 2 states, which could be stored in variables.
11. Container With Most Water - Two pointers.
42. Trapping Rain Water - DP 从O(n)时间O(n)空间优化到O(n)时间O(1)时间, as we only need to keep track of the left highest and right highest.
334. Increasing Triplet Subsequence - 从O(n)时间O(n)空间优化到O(n)时间O(1)时间 - 最佳solution还是挺巧妙的
128. Longest Consecutive Sequence - 巧妙利用hash set
164. Maximum Gap - pigeon hole principle and bucket sort. Even if the numbers are uniformly distributed, the gap would be (max-min)//(len(nums)-1). Therefore, if we set the bucket size to be that, we can ensure that the maximum gap never happens within one single bucket. We can only compare among the buckets.
287. Find the Duplicate Number - 可以用finding the duplicate element in a linked list的方法来做。注意当fast遇到slow的时候,他们并不一定处于loop的开端。所以我们需要用另一个loop来得出loop的开端。


回复

使用道具 举报

🔗
 楼主| xsijg8 2019-8-25 15:08:50 | 只看该作者
全局:
day 21
今天5题
Binary Tree Maximum Path Sum
Populating Next Right Pointers in Each Node II
Reverse Linked List
Binary Tree Upside Down
Construct Binary Tree from Preorder and Inorder Traversal
回复

使用道具 举报

🔗
yan20156 2019-8-25 15:11:10 | 只看该作者
全局:
Day_11 (8/23)
Longest Palindrome
Maximum Subtree
回复

使用道具 举报

🔗
 楼主| xsijg8 2019-8-26 06:02:18 | 只看该作者
全局:
day 22
今日5题
Diameter of Binary Tree
Verify Preorder Serialization of a Binary Tree
Construct Binary Tree from Inorder and Postorder Traversal
Path Sum II
Path Sum
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表