Leetcode
Template Summary Template Summary
Template Summary. Template of 0-1 Knapsack Problem0-1 knapsack problem: 2-d dp array: Outer for loop is iterating item
2022-06-24
Recursion Summary Recursion Summary
Summary of Recursion. LeetCode 77 Combinationsn is the width of the recursion tree. k is the depth of the recursion tree
2022-06-23
Dynamic Programming Summary IV Dynamic Programming Summary IV
Summary of Dynamic Programming IV. LeetCode 300 Longest Increasing SubsequenceDefine dp[i] the longest length of the su
2022-06-22
Dynamic Programming Summary III Dynamic Programming Summary III
Summary of Dynamic Programming III. (House Robber and Stock) LeetCode 198 House RobberWe can consider recursion as a top
2022-06-21
Dynamic Programming Summary II Dynamic Programming Summary II
Summary of Dynamic Programming II. (Knapsack problems) LeetCode 416 Partition Equal Subset SumWe want to find a subset o
2022-06-20
Dynamic Programming Summary I Dynamic Programming Summary I
Summary of Dynamic Programming I. (Basics) DP 5 Steps: Define dp table, i, j Determine recurrent relation Initialize dp
2022-06-19
Binary Search Tree Summary Binary Search Tree Summary
Summary of Binary Search Tree. LeetCode 700 Search in a Binary Search Tree# Definition for a binary tree node. # class
2022-06-18
Binary Tree Summary Binary Tree Summary
Summary of Binary Tree. (preorder, inorder, postorder, level-order traversal not included) LeetCode 101 Symmetric Tree#
2022-06-17
Stack & Queue Summary Stack & Queue Summary
Summary of Stack & Queue. LeetCode 232 Implement Queue using Stacksclass MyQueue: def __init__(self): s
2022-06-16
String Summary String Summary
Summary of String. LeetCode 344 Reverse Stringclass Solution: def reverseString(self, s: List[str]) -> None:
2022-06-15
HashTable Summary HashTable Summary
Summary of HashTable. LeetCode 242 Valid Anagramclass Solution: def isAnagram(self, s: str, t: str) -> bool:
2022-06-14
Linked List Summary Linked List Summary
Summary of Linked List. LeetCode 203 Remove Linked List Elements# Definition for singly-linked list. # class ListNode: #
2022-06-13
1 / 2