Leetcode
👏🏻 leetcode solutions for Humans™
Install / Use
/learn @tech-cow/LeetcodeREADME
Mock Interview 经验 + 反馈
Journey
<br><br><br>
Array Easy
| # | Title | Solution | Time | Space | Video| | --- | ----- | -------- | ---- | ----- | ---- | |624| Maximum Distance in Arrays | Python | O(n)| O(1) ||
Array Medium
| # | Title | Solution | Time | Space | Video| | --- | ----- | -------- | ---- | ----- | ---- | |3| Longest Substring Without Repeating Characters | Python | O(n)| O(n) || |463| Island Perimeter | Python | O(n^2)| O(1)||
Hash Table Easy
| # | Title | Solution | Time | Space | Video| | --- | ----- | -------- | ---- | ----- | ---- | |1| Two Sum | Python | O(n)| O(n) |:tv:| |242| Valid Anagram | Python | O(n)| O(n) ||
Linked List Easy
| # | Title | Solution | Time | Space | Video| | --- | ----- | -------- | ---- | ----- | ---- | |21|Merge Two Sorted Lists | Python | O(n)| O(n) || |89|Partition List | Python | O(n) | O(n) || |141|Linked List Cycle | Python | O(n) | O(1) || |160|Intersection of Two Linked Lists | Python | O(n)| O(1) || |203|Remove Linked List Elements | Python | O(n)| O(1) || |206|Reverse Linked List | Python | O(n)| O(1) || Tutorial](https://www.youtube.com/watch?v=sYcOK51hl-A&t=681s) | |234|Palindrome Linked List | Python | O(n)| O(1) || |83|Remove Duplicates from Sorted List| Python | O(n)| O(1) ||
LinkedList Medium
| # | Title | Solution | Time | Space | Video| | --- | ----- | -------- | ---- | ----- | ---- | |2|Add Two Numbers | Python | O(n)| O(n)| |445| Add Two Numbers II| Python | O(n)| O(n)| |142|Linked List Cycle II| Python | O(n)| O(1)|:tv:| |328|Odd Even Linked List| Python | O(n)| O(1)| |143|Reorder List| Python | O(n)| O(1)| |24|Swap Nodes in Pairs| Python | O(n)| O(1)| |148|Sort List| Python | O(nlogn)| O(1)| |61|Rotate List| Python | O(n)| O(1)| |19|Remove Nth Node From End of List| Python | O(n)| O(1)|:tv:| |138|Copy List with Random Pointer| Python | O(n)| O(n)|
Stacks Easy
| # | Title | Solution | Time | Space | Video| | --- | ----- | -------- | ---- | ----- | ---- | |155|Min Stack| Python | O(1)| O(n)| |225|Implement Stack using Queues| Python | push/pop: O(1) top:O(n) | O(n)| |20|Valid Parentheses| Python | O(n)| O(n)| |346|Moving Average from Data Stream| Python | O(1)| O(n)|
Tree Easy
| # | Title | Solution | Time | Space | Video| | --- | ----- | -------- | ---- | ----- | ---- | |110|Balanced Binary Tree| Python | O(N)| O(h) | |107|Binary Tree Level Order Traversal II| Python | O(N)| O(h) | |112|Path Sum| Python | O(N)| O(h) |:tv:| |100|Same Tree| Python | O(N)| O(1)| |101|Symmetric Tree| Python | O(N)| O(1)|:tv:| |104|Maximum Depth of Binary Tree| Python | O(N)| O(1) || |108|Convert Sorted Array to Binary Search Tree| Python | O(N)| O(N) |:tv:| |111|Minimum Depth of Binary Tree| Python | O(N)| O(1)|| |235|Lowest Common Ancestor of a Binary Search Tree| Python | O(N)| O(1) || |226|Invert Binary Tree| Python | O(N)| O(1) |:tv:| |543|Diameter of Binary Tree| Python | O(N)| O(h) |:tv:| |501|Find Mode in Binary Search Tree| Python | O(N)| O(N) |:tv:| |257|Binary Tree Paths| Python | O(N)| O(N) |:tv:| |572|Subtree of Another Tree| Python | O(S*T)| O(1) |:tv:| |437|Path Sum III| Python | O(N^2)| O(1) | |:tv:| |404|Sum of Left Leaves| Python | O(N)| O(1)|:tv:| |270|Closest Binary Search Tree Value| Python | O(N)| O(1)|:tv:| |563|Binary Tree Tilt| Python | O(N)| O(1) |:tv:| |538|Convert BST to Greater Tree| Python | O(N)| O(1) |:tv:| |637|Average of Levels in Binary Tree| [Python ]
