Skip to content

rliu9/Leetcode-Note

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,350 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Leetcode Problems' Solutions Sync via LeetHub


Backtracking

# Problem
22 Generate Parentheses
39 Combination Sum
40 Combination Sum ii
46 Permutations
47 Permutations ii
60 Permutation Sequence
77 Combinations
78 Subsets
79 Word Search
90 Subsets ii
131 Palindrome Partitioning
797 All Paths From Source to Target

BFS

# Problem
200 Number of Islands
296 Best Meeting Point
305 Number of islands II
490 The Maze
542 01 Matrix
694 Number of Distinct Islands
994 Rotting Oranges
1091 Shortest Path in Binary Matrix

Binary Search

# Problem
33 Search in Rotated Sorted Array
35 Search Insert Position
69 Sqrtx
74 Search a 2d Mtrix
153 Find Minimum in Rotated Sorted Array
162 Find Peak Element
367 Valid Perfect Square
441 Arranging Coins
704 Binary Search
719 Find k th Smallest Pair Distance
852 Peak Index in a Mountain Array
875 Koko Eating Bananas
981 Time Based Key Value Store
2300 Successful Pairs of Spells and Potions

Bit Manipulation

# Problem
136 Single Number
190 Reverse Bits
191 Number of 1 Bits
201 Bitwise and of Numbers Range
268 Missing Number
338 Counting Bits
371 Sum of Two Integers

Cycle | FastSlow (Two Pointers in Linked List)

# Problem
19 Remove-Nth-Node-From-End-of-List
61 Rotate List
86 Partition List
141 Linked List Cycle
142 Linked List Cycle II
143 Reorder List
160 Intersection of Two Linked Lists
876 Middle of the Linked List

DFS

# Problem
79 Word Search
112 Path Sum
117 Populating Next Right Pointers in Each Node II
130 Surrounded Regions
200 Number of Islands
207 Course Schedule
230 Kth Smallest Element in a BST
236 Lowest Common Ancestor of a Binary Tree
250 Count Univalue Subtrees
297 Serialize and Deserialize Binary Tree
298 Binary Tree Longest Consecutive Sequence
437 Path Sum III
547 Number of Provinces
572 Subtree of Another Tree
590 N-ary Tree Postorder Traversal

DP

# Problem
5 Longest Palindromic Substring
44 Wildcard Matching
62 Unique Paths
63 Unique Paths II
64 Minimum Path Sum
70 Climbing Stairs
72 Edit Distance
85 Maximal Rectangle
91 Decode Ways
139 Word Break
152 Maximum Product Subarray
198 House Robber
213 House Robber II
279 perfect Squares
300 Longest Increasing Subsequence
322 Coin Change
343 Integer Break
413 Arithmetic Slices
416 Partition Equal Subset Sum
518 Coin Change 2
583 Delete Operation for Two Strings
647 Palindromic Substrings
673 Number of Longest Increasing Subsequence
1143 Longest Common Subsequence
2327 Number of People Aware of a Secret

Greedy

# Problem
45 Jump Game II
53 Maximum Subarray
55 Jump Game
122 Best Time to Buy and Sell Stock II
134 Gas Station
435 Non Overlapping Intervals
452 Minimum Number of Arrows to Burst Balloons
846 Hand of Straights
2405 Optimal Partition of String
2332 The Latest Time to Catch a Bus
2429 Minimize XOR

Heap

# Problem
23 Merge k Sorted Lists
215 kth Largest Element in an Array
295 Find Median From Data Stream
347 Top k Frequent Elements
621 Task Scheduler
703 kth Largest Element in a Stream
973 k Closest Points to Origin
1046 Last Stone Weight
2406 Divide Intervals into Minimum Number of Groups

Linked List

# Problem
21 Merge Two Sorted Lists
23 Merge k Sorted Lists
24 Swap Nodes in Pairs
25 Reverse Nodes in k Group
143 Reorder List
206 Reverse Linked List

OOD

# Problem
146 LRU Cache
155 Min Stack
384 Shuffle an Array
398 Random Pick Index
604 Design Compressed String Iterator

Prefix

# Problem
1588 Sum of All Odd Length Subarrays

Regular Expression

# Problem
8 String to Integer atoi
10 Regular Expression Matching
722 Remove Comments

Recursion

# Problem
50 powx n
100 Same Tree
102 Binary Tree Level Order Traversal
104 Maximum Depth of Binary Tree
110 Balanced Binary Tree
221 Maximal Square
226 Invert Binary Tree
235 Lowest Common Ancestor of a Binary Search Tree
543 Diameter of Binary Tree
559 Maximum Depth of n-ary Tree
572 Subtree of Another Tree
700 Search in a Binary Search Tree
780 Reaching Points
1444 Number of Ways of Cutting a Pizza
1448 Count Good Nodes in Binary Tree

SQL

# Problem
175 Combine Two Tables
182 Duplicate Emails
197 Rising Temperature

Stack

# Problem
20 Valid Parentheses
71 Simplify Path
150 Evaluate Reverse Polish Notation
155 Min Stack
224 Basic Calculator
232 Implement Queue Using Stacks
739 Daily Temperatures
844 Backspace String Compare
2289 Steps to Make Array Non-decreasing
2487 Remove Nodes From Linked List
2645 Minimum Additions to Make Valid String

String

# Problem
8 String to Integer atoi
38 Count and Say
187 Repeated DNA Sequences
242 Valid Anagram
243 Shortest Word Distance
249 Group Shifted Strings
271 Encode and Decode Strings
293 Flip Game
344 Reverse String
1427 Perform String Shifts
2337 Move Pieces to Obtain a String

Sliding Window

# Problem
3 Longest Substring Without Repeating Characters
209 Minimum Size Subarray Sum
219 Contains Duplicate II
239 Sliding Window Maximum
424 Longest Repeating Character Replacement
438 Find All Anagrams in a String
567 Permutation in String
713 Subarray Product Less Than K
1151 Minimum Swaps to Group all 1s Together

Trie

# Problem
208 Implement Trie (Prefix Tree)
211 Design Add and Search Words Data Structure
212 Word Search II

Two Pointers

# Problem
11 Container With Most Water
15 3sum
16 3sum Closest
31 Next Permutation
41 First Missing Positive
42 Trapping Rain Water
82 Remove Duplicates From Sorted List II
125 Valid Palindrome
167 Two Sum II Input Array is Sorted
344 Reverse String
345 Reverse Vowels of a String
844 Backspace String Compare
986 Interval List Intersections

Other

# Problem
1 Two Sum
2 Add Two Numbers
6 Zigzag Conversion
12 Integer to Roman
13 Roman to Integer
14 Longest Common Prefix
17 Letter Combinations of a Phone Number
18 4sum
19 Remove nth Node from End of List
21 Merge Two Sorted Lists
36 Valid Sudoku
37 Sudoku Solver
48 Rotate Image
56 Merge Intervals
58 Length of Last Word
59 Spiral Matrix II
66 Plus One
68 Text Justification
73 Set Matrix Zeroes
86 Partition List
88 Merge Sorted Array
125 Valid Palindrome
128 Longest Consecutive Sequence
137 Single Number ii
163 Missing Ranges
172 Factorial Trailing Zeroes
217 Contains Duplicate
202 Happy Number
229 Majority Element II
237 Delete Node in a Linked List
238 Product of Array Except Self
252 Meeting Rooms
266 Palindrome Permutation
268 Missing Number
289 Game of Life
199 Bulls and Cows
409 Longest Palindrome
424 Longest Repeating Character Replacement
448 Find All Numbers Disappeared in an Array
454 4Sum II
500 Keyboard Row
551 Student Attendance Record I
567 Permutation in String
1010 Pairs of Songs with Total Durations Divisible by 60
2221 Find Triangular Sum of an Array
2310 Sum of Numbers With Units Digit K
2341 Maximum Number of Pairs in Array
2342 Max Sum of a Pair With Equal Sum of Digits
2404 Most Frequent Even Element
2419 Longest Subarray with Maximum Bitwise AND
2438 Range Product Queries of Powers
2455 Average Value of Even Numbers That Are Divisible by Three

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published