TracyDai23 / Leetcode

0 stars 1 forks source link

leetcode progress check since May #4

Open TracyDai23 opened 5 years ago

TracyDai23 commented 5 years ago

Since May 27th, start to go through problems with topics. Target: go through problems by reading official or others' answer and be familiar with major algorithm and pattern.

看视频,抄答案 medium: 109: BTS, Linked list

TracyDai23 commented 5 years ago

May 28th: 230: BTS, 探讨recursion的全局变量和local 变量怎么设置和调用的问题。 其他人的答案提到了python generator,具体介绍看 #2

TracyDai23 commented 5 years ago

May 29th: 114:dfs() 的recursion引用应该是dfs(r.right) dfs(r.left) 然后再是关于root的操作。这个顺序是根据遍历的方式来的。 preorder traversal: root的操作,dfs(root.left), dfs(root.right) inorder traversal: dfs(root.left), root的操作,dfs(root.right) postorder traversal: dfs(root.left), dfs(root.right), root的操作

199: preorder 的一道题

TracyDai23 commented 5 years ago

May 30th: 235: 自己写出来了,easy题 236: 235 的类似题,medium,因为对象换成了binary tree,而不是bst。没有看视频解说,想根据前面的题自己写一下。 131: 一道back tracking, 完全没有思路,研究了半小时后,开始看答案。

TracyDai23 commented 5 years ago

June 1st: 236: 看完解说视频,尝试自己写,没有写对。 June 3rd: 236: 错误原因是sub function的调用没有理解到位,以及没有return subfunction的调用结果

TracyDai23 commented 5 years ago

Jun 4th: 437: 自己试着做了一天,逻辑思路是对的,但是这个题是两层recursion。代码实现方面还需要加强,包括怎么return,怎么设置global variable 或者local variable

TracyDai23 commented 5 years ago

Jun 6th: 105: 做了两个小时,逻辑是通顺的。 但是,卡在了recursion 的自身调用和sub-function的使用上, 同时由于尝试用sub-function,global variable出现了问题。 in short, in this recursion question, I was stuck on the sub-function and global varialbe. This is a great example not to use global variable.

TracyDai23 commented 5 years ago

Jun 18th: 56: 思路大致是对的,但是偷懒直接看答案,而没有坚持自己写代码。这个问题很大! 不能总是偷懒,这样写代码能力会出问题的。

TracyDai23 commented 5 years ago

Jun 23th: 62: dynamic programming 题,很久没做计划递归了。 一个很清楚的说明视频,说明了动态规划的思考思路!

63: 62题的变化。 自己写出来的,主要是改变下边界定义 64: 62, 63题的变化题。同样的方法。 75 78

TracyDai23 commented 5 years ago

Jun 24th: 79 96 98 102 121 139

TracyDai23 commented 5 years ago

July 4th: 研究SDE的职位要求,同时完成udemy的课程。 下一步再研究spark等distributed system。

job title research:

  1. SDE: finish udemy course
  2. data engineer: explore spark and hadoop resource and certification.
TracyDai23 commented 5 years ago

July 5th: 完成了了解pycharm。 优点是可以很好在app内完成不同compiler的使用,比如python2, python3,而不需要另外的virtual machine。 完成了mongodb的设置。

TracyDai23 commented 5 years ago

Oct 11: Do not understand 160, how the while loop can satisfy the need of offset step matching needs?

TracyDai23 commented 5 years ago

Problem 221, did not finish looping part.

TracyDai23 commented 4 years ago

problem 572 Subtree of Another Tree: did not correctly finish the recursion. Need to practice again.

TracyDai23 commented 4 years ago

Tag/Topic Practice

1: Heap

problem 的描述经常需要top k 973 23 295 253 692

2: Union and Find

200

Sliding Window

3: Divide and Conquer

973 240 23 53

4: Trie

472 212 642 692

5: Binary Search

240

6: Two Pointers

42

7: Greedy

1167 253 45

BFS

200 994 127 126 103 207 909 675

TracyDai23 commented 4 years ago

11/21 Finished problem: 937 21

TracyDai23 commented 4 years ago

11/22 Finished problem: 973

TracyDai23 commented 4 years ago

11/23: 23, 295 11/24: 253, 692, 200, 240, 53 11/25: shopping for holidays 11/26: 208, 212

TracyDai23 commented 4 years ago

2020 Fall:

Topics # of Problems # of Soved P % 2020 Check
Graph 49 2 4.08% 3
Dynamic Programming 224 15 6.70% 4
DFS 136 12 8.82% 5
Greedy 103 7 6.80% 6
Math 189 15 7.94% 7
Stack 61 5 8.20% 8
Array 289 52 17.99% Done, 0 Java
Binary Search 93 10 10.75% Done, 1
Heap 35 8 22.86% Done, 2

1. Binary search:

9/30/2020: 35[E] Python3, Java 74[M] Java 240[M] Java 209[M] Java ( self resolved the O(n) solution, but read other's O(nlogn) solution 10/18/2020: 69[E] Java, java报错了timeout和overflow 875[M] Java, 1hr后没有完成corner case, 看答案

10/19: 875[M] 378[H]

10/20: 4[H]

//719[H]

TracyDai23 commented 4 years ago

2. 复习一下Heap

10/21: 703[E] 1046[E] 692[M] 973[M] 295[H] 239[H] 253[M] 347[M] 767[M] 23

TracyDai23 commented 4 years ago

5. Graph

1042 [E] 997 [E] 210 [M] 332 [M] 207 [M] 785 [M] 133 [M] 797 [M] 959 [M] 269 [H] 1153 [H]

TracyDai23 commented 3 years ago

12/17 刷完了BFS,基本会DFS了。总结了下,最近可以开始刷高频了。准备在1月15号之前跳组。 12/17: 146 LRU cache: 基本能默写出来了 200 Number of Islands: 10分钟bugfree 2 [Linked List]: 22 min

TracyDai23 commented 3 years ago

12/25: 763[M]: Greedy, Two Pointers 1hr 自己写出来的 1152[M]: Hash Table, zip, set combination // 思路是对的,但是实现上没有做好,最后直接看了答案 !需要重新自己写一遍

12/26:

12/27 957[M]

TracyDai23 commented 3 years ago

12/31 221[M]:DP bugfree 1010[M]: Math bugfree 253[M]: Sliding Window, Heap 30min 210[M]: Graph, !!还需要重新看

TracyDai23 commented 3 years ago

1/2 Contest 1710[E] 1711[M] 1712[M]: Binary Search, did not resolve it myself.

1/3 348[M]: bug free 1hr 1120[M]: tree, bug free, 28min 735[M]: stack, 简单,但是没有主要corner case,所以没能bug free,14min 694[M]: Number of distinct islands //变种的200. 我没有做出来,思路是对的,用相对位置来记录island形状,但是没有implement出来,因为过于急躁,没有能够把思路整理清楚再修改。这题的难点是把开始位置default成(0,0),这样直接完成位置记录,而不需要像我考虑的,是把所有绝对位置都拿到之后再计算相对位置。 1396[M]: Design, 20min, bug free 1041[M]: Math, 完全看了答案copy的