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

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

🔗
coldcoffee.jp 2019-8-20 11:16:27 | 只看该作者
全局:
打卡Day 3

274. H-Index - Spent most of the time trying to figure out the definition..
169. Majority Element - Boyer-Moore Voting Algorithm, O(n) one pass
229. Majority Element II - Applying the same algorithm 2 times as there could be two candidates that appear more than [n/3] times
243. Shortest Word Distance
244. Shortest Word Distance II - Preprocessing the indices in a hash table
245. Shortest Word Distance III - Very similar to 243. Shortest Word Distance
217. Contains Duplicate  
219. Contains Duplicate II  
220. Contains Duplicate III - Bucket sort + sliding windows
188. Best Time to Buy and Sell Stock IV - bottom up dp - the use of local max and global max (hard)






回复

使用道具 举报

🔗
yan20156 2019-8-20 16:18:12 | 只看该作者
全局:
Day_7 (8/19)

Factorization // deal when remain is 1
Sudoku Solver //  how to find the next empty spot in O(1)
回复

使用道具 举报

🔗
xxJay 2019-8-21 03:01:20 | 只看该作者
全局:
#Day_6

692. top-k-frequent-words
6.zig-zag-conversion
回复

使用道具 举报

🔗
coldcoffee.jp 2019-8-21 08:56:08 | 只看该作者
全局:
xsijg8 发表于 2019-8-19 13:59
哇,一天八九题这个速度可以啊

谢谢鼓励 今天就有点偷懒了
回复

使用道具 举报

🔗
coldcoffee.jp 2019-8-21 11:37:50 | 只看该作者
全局:
打卡Day 4

376. Wiggle Subsequence - O(n) one pass greedy approach. Only peaks and valleys matter.
280. Wiggle Sort - O(n) one pass. Could get rid of the sign variable by noticing if the index is odd/even.
324. Wiggle Sort II - Easy if sorting is allowed. Hard using quickSelect to first select the medium of the array (deterministic selection is even better), and then place larger numbers on odd indices, smaller numbers on even indices. A lot of work - implementation wise.
113. Path Sum II - DFS

回复

使用道具 举报

🔗
Sato123 2019-8-21 11:39:39 | 只看该作者
全局:
#Day_19

Finished * 2
Spiral Matrix II
Evaluate Reverse Polish Notation
回复

使用道具 举报

🔗
 楼主| xsijg8 2019-8-21 12:43:38 | 只看该作者
全局:
day 16
Minimum Depth of Binary Tree
Maximum Depth of Binary Tree
Balanced Binary Tree
回复

使用道具 举报

🔗
darktef 2019-8-21 14:21:17 | 只看该作者
全局:
Day 15
Revisit how to do tree traversal iteratively
98 validate binary search tree, recursively or iteratively with prev
173 binary search tree iterator, either inorder array, or inorder stack iterative
199 binary tree right side view + 958 check completeness of a binary tree, bfs
501 find mode in binary search tree, brute force recursively w/ hash, or use stack iteratively to do two pass
257 binary tree path, dfs, be careful with backtracking and definition of leaf
回复

使用道具 举报

🔗
 楼主| xsijg8 2019-8-21 14:46:04 | 只看该作者
全局:
day 17
Recover Binary Search Tree
Verify Preorder Sequence in Binary Search Tree
这两题都没啥清晰思路,看了答案然后自己想了一遍写了。

————————
昨天写好了忘记点发送,今天补打卡= =
回复

使用道具 举报

🔗
yan20156 2019-8-21 15:27:25 | 只看该作者
全局:
Day_8 (8/20)

Expression Add Operations
Generalized Abbreviation
// In DFS, try to avoid for-loop which may cause MLE and duplicate items
回复

使用道具 举报

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

本版积分规则

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