LeetCode Notepad
Getting Started •
About •
Table of Contents •
Acknowledgment •
FAQ •
There are not only LeetCode solutions but also notes on various algorithm techniques.
Everything in this project is based on the Java language, using features such as the Java language paradigm.
Section #Getting Started
contains one hundred popular interview problems, which is a good place to start.
#1
Two Sum #2
Add Two Numbers #3
Longest Substring Without Repeating Characters #4
Median of Two Sorted Arrays #5
Longest Palindromic Substring #7
Reverse Integer #8
String to Integer (atoi)/src) #10
Regular Expression Matching #11
Container With Most Water #13
Roman to Integer #14
Longest Common Prefix #15
3Sum #17
Letter Combinations of a Phone Number #19
Remove Nth Node From End of List #20
Valid Parentheses #21
Merge Two Sorted Lists #22
Generate Parentheses #23
Merge k Sorted Lists #26
Remove Duplicates from Sorted Array #45
Jump Game II #55
Jump Game #78
Subsets #101
Symmetric Tree #103
Binary Tree Zigzag Level Order Traversal #104
Maximum Depth of Binary Tree #121
Best Time to Buy and Sell Stock #122
Best Time to Buy and Sell Stock II Summary of algorithm notes:
Section #Table of Contents
contains the summary of the algorithm notes and all the problems.
#88
Merge Sorted Array #148
Sort List #179
Largest Number #215
Kth Largest Element in an Array #50
Pow(x,n)/src) #263
Ugly Number #264
Ugly Number II #914
X of a Kind in a Deck of Cards #1201
Ugly Number III #1227
Airplane Seat Assignment Probability #1524
Number of Sub-arrays With Odd Sum #1551
Minimum Operations to Make Array Equal #8
String to Integer (atoi)/src) #14
Longest Common Prefix #28
Implement strStr()/src) #1
Two Sum #9
Palindrome Number #26
Remove Duplicates from Sorted Array #19
Remove Nth Node From End of List #3
Longest Substring Without Repeating Characters #27
Remove Element #35
Search Insert Position #42
Trapping Rain Water #66
Plus One #73
Set Matrix Zeroes #75
Sort Colors #76
Minimum Window Substring #80
Remove Duplicates from Sorted Array II #81
Search in Rotated Sorted Array II #125
Valid Palindrome #167
Two Sum II - Input array is sorted #344
Reverse String #438
Find All Anagrams in a String #485
Max Consecutive Ones #567
Permutation in String #1004
Max Consecutive Ones III #1234
Replace the Substring for Balanced String #54
Spiral Matrix #2
Add Two Numbers #21
Merge Two Sorted Lists #23
Merge k Sorted Lists #25
Reverse Nodes in k-Group #61
Rotate List #92
Reverse Linked List II #138
Copy List with Random Pointer #141
Linked List Cycle #142
Linked List Cycle II #206
Reverse Linked List #237
Delete Node in a Linked List #876
Middle of the Linked List #725
Split Linked List in Parts #1171
Remove Zero Sum Consecutive Nodes from Linked List #1290
Convert Binary Number in a Linked List to Integer #1669
Merge In Between Linked Lists #20
Valid Parentheses #50
Pow(x,n)/src) #84
Largest Rectangle in Histogram #94
Binary Tree Inorder Traversal #144
Binary Tree Preorder Traversal #145
Binary Tree Postorder Traversal #1441
Build an Array With Stack Operations #102
Binary Tree Level Order Traversal #225
Implement Stack using Queues #232
Implement Queue using Stacks #239
Sliding Window Maximum #622
Design Circular Queue #641
Design Circular Deque #933
Number of Recent Calls #950
Reveal Cards In Increasing Order #1306
Jump Game III #1696
Jump Game VI #98
Validate Binary Search Tree #103
Binary Tree Zigzag Level Order Traversal #105
Construct Binary Tree from Preorder and Inorder Traversal #114
Flatten Binary Tree to Linked List #116
Populating Next Right Pointers in Each Node #222
Count Complete Tree Nodes #226
Invert Binary Tree #230
Kth Smallest Element in a BST #236
Lowest Common Ancestor of a Binary Tree #297
Serialize and Deserialize Binary Tree #341
Flatten Nested List Iterator #450
Delete Node in a BST #538
Convert BST to Greater Tree #652
Find Duplicate Subtrees #654
Maximum Binary Tree #700
Search in a Binary Search Tree #701
Insert into a Binary Search Tree #814
Binary Tree Pruning #938
Range Sum of BST #208
Implement Trie (Prefix Tree)/src) #207
Course Schedule #210
Course Schedule II #797
All Paths From Source to Target #111
Minimum Depth of Binary Tree #690
Employee Importance #752
Open the Lock #1345
Jump Game IV #4
Median of Two Sorted Arrays #34
Find First and Last Position of Element in Sorted Array #69
Sqrt(x)/src) #74
Search a 2D Matrix #153
Find Minimum in Rotated Sorted Array #154
Find Minimum in Rotated Sorted Array II #704
Binary Search #1482
Minimum Number of Days to Make m Bouquets #17
Letter Combinations of a Phone Number #22
Generate Parentheses #46
Permutations #51
N-Queens #78
Subsets #79
Word Search #698
Partition to K Equal Sum Subsets #45
Jump Game II #55
Jump Game #435
Non-overlapping Intervals #452
Minimum Number of Arrows to Burst Balloons #781
Rabbits in Forest #1024
Video Stitching #1221
Split a String in Balanced Strings #1431
Kids With the Greatest Number of Candies #1403
Minimum Subsequence in Non-Increasing Order #7
Reverse Integer #1720
Decode XORed Array #5
Longest Palindromic Substring #53
Maximum Subarray #72
Edit Distance #87
Scramble String #91
Decode Ways #121
Best Time to Buy and Sell Stock #122
Best Time to Buy and Sell Stock II #123
Best Time to Buy and Sell Stock III #188
Best Time to Buy and Sell Stock IV #309
Best Time to Buy and Sell Stock with Cooldown #714
Best Time to Buy and Sell Stock with Transaction Fee #213
House Robber II #300
Longest Increasing Subsequence #322
Coin Change #354
Russian Doll Envelopes #583
Delete Operation for Two Strings #1143
Longest Common Subsequence #12
Integer to Roman #13
Roman to Integer Git commit format:
git commit -m "feat/fix/docs(#problem_id): | Description:(unnecessary), Solution:(unnecessary)"
| message | explain |
| —— | —— |
| feat | Commit a solution |
| fix | A bug fix |
| perf | A code change that improves performance |
| docs | Documentation only changes |
| test | Adding missing tests or correcting existing tests |