Skip to content

👏🏻 leetcode solutions for Humans™

Notifications You must be signed in to change notification settings

tech-cow/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


yuzhoujr

公瑾现在提供以下服务哟!Contact me @ yu.zhou.jr@gmail.com
http://yuzhoujr.com/legacy/dummynode.pdf


Mock Interview 经验 + 反馈

Journey

时间线




Array Easy

#TitleSolutionTimeSpaceVideo
624Maximum Distance in ArraysPythonO(n)O(1)

Array Medium

#TitleSolutionTimeSpaceVideo
3Longest Substring Without Repeating CharactersPythonO(n)O(n)
463Island PerimeterPythonO(n^2)O(1)

Hash Table Easy

#TitleSolutionTimeSpaceVideo
1Two SumPythonO(n)O(n)📺
242Valid AnagramPythonO(n)O(n)

Linked List Easy

#TitleSolutionTimeSpaceVideo
21Merge Two Sorted ListsPythonO(n)O(n)
89Partition ListPythonO(n)O(n)
141Linked List CyclePythonO(n)O(1)
160Intersection of Two Linked ListsPythonO(n)O(1)
203Remove Linked List ElementsPythonO(n)O(1)
206Reverse Linked ListPythonO(n)O(1)
234Palindrome Linked ListPythonO(n)O(1)
83Remove Duplicates from Sorted ListPythonO(n)O(1)

LinkedList Medium

#TitleSolutionTimeSpaceVideo
2Add Two NumbersPythonO(n)O(n)
445Add Two Numbers IIPythonO(n)O(n)
142Linked List Cycle IIPythonO(n)O(1)📺
328Odd Even Linked ListPythonO(n)O(1)
143Reorder ListPythonO(n)O(1)
24Swap Nodes in PairsPythonO(n)O(1)
148Sort ListPythonO(nlogn)O(1)
61Rotate ListPythonO(n)O(1)
19Remove Nth Node From End of ListPythonO(n)O(1)📺
138Copy List with Random PointerPythonO(n)O(n)

Stacks Easy

#TitleSolutionTimeSpaceVideo
155Min StackPythonO(1)O(n)
225Implement Stack using QueuesPythonpush/pop: O(1) top:O(n)O(n)
20Valid ParenthesesPythonO(n)O(n)
346Moving Average from Data StreamPythonO(1)O(n)

Tree Easy

#TitleSolutionTimeSpaceVideo
110Balanced Binary TreePython O(N)O(h)
107Binary Tree Level Order Traversal IIPython O(N)O(h)
112Path SumPython O(N)O(h)📺
100Same TreePython O(N)O(1)
101Symmetric TreePython O(N)O(1)📺
104Maximum Depth of Binary TreePythonO(N)O(1)
108Convert Sorted Array to Binary Search TreePython O(N)O(N)📺
111Minimum Depth of Binary TreePython O(N)O(1)
235Lowest Common Ancestor of a Binary Search TreePythonO(N)O(1)
226Invert Binary TreePython O(N)O(1)📺
543Diameter of Binary TreePython O(N)O(h)📺
501Find Mode in Binary Search TreePython O(N)O(N)📺
257Binary Tree PathsPython O(N)O(N)📺
572Subtree of Another TreePython O(S*T)O(1)📺
437Path Sum IIIPython O(N^2)O(1)
404Sum of Left LeavesPython O(N)O(1)📺
270Closest Binary Search Tree ValuePython O(N)O(1)📺
563Binary Tree TiltPython O(N)O(1)📺
538Convert BST to Greater TreePython O(N)O(1)📺
637Average of Levels in Binary TreePython O(N)O(1)

Tree Medium

#TitleSolutionTimeSpaceVideo
144Binary Tree Preorder TraversalPython O(N)O(N)📺
102Binary Tree Level Order TraversalPython O(N)O(N)📺
107Binary Tree Level Order Traversal IIPython O(N)O(N)
515Find Largest Value in Each Tree RowPython O(N)O(1)
236Lowest Common Ancestor of a Binary TreePython O(N)O(1)📺
199Binary Tree Right Side ViewPython O(N)O(N)📺
114Flatten Binary Tree to Linked ListPython O(N)O(1)📺
230Kth Smallest Element in a BSTPython O(N)O(1)📺
582Kill ProcessPython O(N)O(N)📺

Backtrack Medium

#TitleSolutionTimeSpaceVideo
78SubsetsPython O(N*(2^N))O(2^N)📺
90Subsets IIPython O(N*(2^N))O(2^N)📺
46PermutationsPython O(N*(N!))O(N!)📺
47Permutations IIPython O(N*(N!))O(N!)📺
60Permutation SequencePython O(N * (N!)O(N)
77CombinationsPython O(N*(N!))O(N!)
39Combination SumPython O(K * (2^N)O(N)📺
40Combination Sum IIPython O(K * (2^N)O(N)📺
216Combination Sum IIIPython O(K * (2^N)O(N)
17Letter Combinations of a Phone NumberPython O(N*(4^N))O(N)📺
131Palindrome PartitioningPython O(N*(2^N))O(N)📺

Greedy Medium

#TitleSolutionTimeSpaceVideo
452Minimum Number of Arrows to Burst BalloonsPython O(N)O(1)

Dynamic Programming Easy

#TitleSolutionTimeSpaceVideo
70Climbing StairsPython O(N)O(1)Easy
53Maximum SubarrayPython O(N)O(N)Easy
198House RobberPython O(N)O(N)Easy

Dynamic Programming Medium

#TitleSolutionTimeSpaceVideo
64Minimum Path SumPython O(N^2)O(M*N)📺
62Unique PathsPython O(N^2)O(M*N)Reference #64
55Jump GamePython O(N^2)O(1)TLE with DP/Use Greedy for O(N) Solution
45Jump Game IIPython O(N^2)O(1)TLE with DP/Use Greedy for O(N) Solution
300Longest Increasing SubsequencePython O(N^2)O(1)Use Binary-Search for NlogN Solution

BitMap Easy

#TitleSolutionTimeSpaceVideo
136Single NumberPython O(N)O(1)📺

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

🌱 MIT @ Yu Zhou 🌱


homeyuzhoujr.com  ·  github@yuzhoujr  ·  linkedin@yuzhoujr

close