楼主: lkz4618
跳转到指定楼层
上一主题 下一主题
收起左侧

NG转码小白刷题打卡

🔗
 楼主| lkz4618 2022-7-8 14:07:44 | 只看该作者
全局:
好耶上周周赛终于更新啦,knight勋章到手,开心!不枉我一直头铁打周赛,guardian太难了短时间不想了不过可以慢慢努力!


回复

使用道具 举报

🔗
 楼主| lkz4618 2022-7-8 14:09:35 | 只看该作者
全局:
Knight入手截图留念,慢慢来吧说不定以后能dream一个Guardian呢?


回复

使用道具 举报

🔗
 楼主| lkz4618 2022-7-9 14:53:51 | 只看该作者
全局:
7/8 Fri: (Day 41, total new + 10 = 334) 有4题是easy
- [285. Inorder Successor in BST](https://leetcode.com/problems/inorder-successor-in-bst/) (Medium) (BST or general inorder traversal)
- [510. Inorder Successor in BST II](https://leetcode.com/problems/inorder-successor-in-bst-ii/) (Medium) (BST)
- Daily Challenge:
- [1696. Jump Game VI](https://leetcode.com/problems/jump-game-vi/) (Medium) (dp + sliding window of monoque or heap) (also segment tree - not done yet)
- Top Google:
- [489. Robot Room Cleaner](https://leetcode.com/problems/robot-room-cleaner/) (Hard) (backtrack)
- [539. Minimum Time Difference](https://leetcode.com/problems/minimum-time-difference/) (Medium) (sort/bucket sort)
- [562. Longest Line of Consecutive One in Matrix](https://leetcode.com/problems/lo ... tive-one-in-matrix/) (Medium)
- Layback and do some easy levels:
- [349. Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/)
- [367. Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/) (binary search / Newton's method)
- [374. Guess Number Higher or Lower](https://leetcode.com/problems/guess-number-higher-or-lower/) (binary search)
- [389. Find the Difference](https://leetcode.com/problems/find-the-difference/) (Counter or XOR bit manipulation)
回复

使用道具 举报

🔗
 楼主| lkz4618 2022-7-10 13:48:37 | 只看该作者
全局:
7/9 Sat: (Day 42, total new + 4 = 338) 白天都在外面,回来打完周赛理清楚最后一题就很晚了,歇了吧,周赛也还是普通水平甚至有退步
- Weekly Contest 301:
- [2335. Minimum Amount of Time to Fill Cups](https://leetcode.com/problems/mi ... -time-to-fill-cups/)
- [2336. Smallest Number in Infinite Set](https://leetcode.com/problems/smallest-number-in-infinite-set/) (Medium) (heap)
- [2337. Move Pieces to Obtain a String](https://leetcode.com/problems/move-pieces-to-obtain-a-string/) (Medium) (one pass greedy)
- [2338. Count the Number of Ideal Arrays](https://leetcode.com/problems/count-the-number-of-ideal-arrays/) (Hard) (dp+knowldge on combination etc)
回复

使用道具 举报

🔗
 楼主| lkz4618 2022-7-11 15:36:38 | 只看该作者
全局:
7/10 Sun: (Day 43, total new + 7 = 345)
- Top Goolge:
- [652. Find Duplicate Subtrees](https://leetcode.com/problem-list/top-google-questions/) (Medium) (serialize tree with string, note there's faster tuple version not understood yet)
- [552. Student Attendance Record II](https://leetcode.com/problems/student-attendance-record-ii/) (Hard) (dp)
- [729. My Calendar I](https://leetcode.com/problems/my-calendar-i/) (Medium) (binary search / binary search tree / segment tree (not done))
- [777. Swap Adjacent in LR String](https://leetcode.com/problem-list/top-google-questions/?page=1) (Medium) (two pointers)
- [792. Number of Matching Subsequences](https://leetcode.com/problems/number-of-matching-subsequences/) (Medium) (hashmap + binary search or special methods)
- easy levels:
- [551. Student Attendance Record I](https://leetcode.com/problems/student-attendance-record-i/) (one pass or regex re.search)
- [392. Is Subsequence](https://leetcode.com/problems/is-subsequence/solution/) (two pointers)
- redo old question:
- [72. Edit Distance](https://leetcode.com/problems/edit-distance/) (Hard) (dp)
回复

使用道具 举报

🔗
 楼主| lkz4618 2022-7-12 14:12:28 | 只看该作者
全局:
7/11 Mon: (Day 44, total new + 6 = 351) 复习了下Trie但还是感觉不够熟练, top google的hard题一直啃得有点慢,不会是google
- [159. Longest Substring with At Most Two Distinct Characters](https://leetcode.com/problems/lo ... istinct-characters/) (Medium) (two pointers)
- [340. Longest Substring with At Most K Distinct Characters](https://leetcode.com/problems/lo ... istinct-characters/) (Medium) (two pointers + heap and hahsmap / linked-hashmap collections.OrderedDict())
- [424. Longest Repeating Character Replacement](https://leetcode.com/problems/lo ... racter-replacement/) (Medium) (two pointers + greedy) (This is really a hard, I can't come up with O(N) w/o seeing before)
- [473. Matchsticks to Square](https://leetcode.com/problems/matchsticks-to-square/) (Medium) (backtrack, bin-pack problem NP-complete so can only exponential solution)
- [698. Partition to K Equal Sum Subsets](https://leetcode.com/problems/partition-to-k-equal-sum-subsets/) (Medium) (backtrack same as above)
- Top google:
- [642. Design Search Autocomplete System](https://leetcode.com/problems/design-search-autocomplete-system/) (Hard) (Trie class + dfs)
回复

使用道具 举报

🔗
 楼主| lkz4618 2022-7-13 14:38:59 | 只看该作者
全局:
7/12 Tue: (Day 45, total new + 3 = 354) 2题lintcode only没算进去,加上旧题其实做了挺久。另外学习了segment tree,写了array implement的模板,但是还没学用tree node的版本。
- 炼码精选100题
- [23. Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/) (Hard) (heap or divede and conquer)
- [124. Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-sum/) (Hard) (top down dp, same as recursion + memo)
- [lintcode only 45. Maximum Subarray Difference](https://www.lintcode.com/problem ... mp;_from=collection) (Medium) (dp of two direction + one pass seperator position O(N)) (not listed in leetcode, only in lintcode, very nice problem)
- [lintcode only 42. Maximum Subarray II](https://www.lintcode.com/problem ... mp;_from=collection) (Medium) (Kadane's alg of two direction + one pass seperator position O(N)) (can replace dp with presum + one pass) (lintcode only)
- Learning segment tree
- [307. Range Sum Query - Mutable](https://leetcode.com/problems/range-sum-query-mutable/) (Medium) (segment tree by array)
- redo old ones:
- 1. two sum
- 141. Linked List Cycle
- 300. Longest Increasing Subsequence (dp O(N^2) / deque + binary search O(NlogN))
- 102. Binary Tree Level Order Traversal
回复

使用道具 举报

🔗
 楼主| lkz4618 2022-7-14 16:22:55 | 只看该作者
全局:
7/13 Wed: (Day 46, total new + 5 = 359) 3 Medium 2 Hard,这样的5新题量有点吃不消了,熬夜才达标。主要有些hard真的需要花很久很久吃透… 再撑一会等快400了就开始1-2新hard+复习旧题medium吧
- 炼码精选100题
- [264. Ugly Number II](https://leetcode.com/problems/ugly-number-ii/)(Medium) (dp, track generator) (or heap + hashset)
- [4. Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/) (Hard) (同向two pointers + binary sect)
- [494. Target Sum](https://leetcode.com/problems/target-sum/) (Medium) (good example of backtrack + memo end in a dp solution)
- Top google:
- [715. Range Module](https://leetcode.com/problems/range-module/)(Hard) (binary search interval可行但是细节过多且O(N)copy time,TreeMap/SortedDict还没试)
- [833. Find And Replace in String](https://leetcode.com/problems/find-and-replace-in-string/) (Medium) (simulation, string building)
- redo old ones:
- 97. Interleaving String (medium) (dp 2D)
- 105. Construct Binary Tree from Preorder and Inorder Traversal (Medium) (recursion)
回复

使用道具 举报

🔗
 楼主| lkz4618 2022-7-15 15:00:24 | 只看该作者
全局:
7/14 Thu: (Day 47, total new + 4 = 362 + (3), + redo 5 old)
- 炼码精选100题:
- [42. Trapping Rain Water](https://leetcode.com/problems/trapping-rain-water/) (Hard) (dp/inwards two pointers/one pass with stack or two pass)
- [lintcode only 1375 Substring With At Least K Distinct Characters](https://www.lintcode.com/problem/1375/) (Medium) (two pointers sliding window)
- [475. Heaters](https://leetcode.com/problems/heaters/) (Hard) (two pointers, maintain a relation)
- Top Google:
- [726. Number of Atoms](https://leetcode.com/problems/number-of-atoms/) (Hard) (recursion or backwrads stack)
- practice on old questions:
- 209. Minimum Size Subarray Sum (Medium) (sliding window)
- 76. Minimum Window Substring (Hard) (sliding window + counter)
- 3. Longest Substring Without Repeating Characters (Medium) (two pointers + hashmap)
- 340. Longest Substring with At Most K Distinct Characters (Medium) (two pointers + counter)
- 763. Partition Labels (Medium) (hashmap + greedy)

补充内容 (2022-07-15 15:01 +8:00):
开始转移重点做二刷罗, 今天主要练two pointer sliding window,新题就主要啃top google hard先
回复

使用道具 举报

🔗
 楼主| lkz4618 2022-7-16 14:42:19 | 只看该作者
全局:
7/15 Fri: (Day 48, total new + 6 = 364+(6), redo 2 old)
- [134. Gas Station](https://leetcode.com/problems/gas-station/) (Medium) (pretty hard O(N)) (硬考greedy,很少见,greedy里10%)
- [lintcode only- 1896 · Pick Carrots](https://www.lintcode.com/problem/1896/description) (esay but like bfs)
- [877. Stone Game](https://leetcode.com/problems/stone-game/) (Medium) (dp O(N^2) or game theory O(1))
- [lintcode only- 476 · Stone Game](https://www.lintcode.com/problem/476/description) (Medium) (recursion + memo ends like 2D-dp with O(n) relation -> O(N^3))
- [lintcode only- 183 · Wood Cut](https://www.lintcode.com/problem/183/) (Hard) (bisect answer space)
- [576. Out of Boundary Paths](https://leetcode.com/problems/out-of-boundary-paths/) (Medium) (pretty standard 3D-dp)
- practice old classic questions:
- 153. Find Minimum in Rotated Sorted Array (Medium) (many different ways)
- 33. Search in Rotated Sorted Array (Medium) (two pass binary search, first time fing min_ind, second time find related_target_ind. Don't try to do one pass binarysearch! feasible but super hard and suble!!)
回复

使用道具 举报

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

本版积分规则

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