LeetCode
This repository contains the solutions and explanations to the algorithm problems on LeetCode. Only medium or above are included. All are written in C++/Python and implemented by myself. The problems attempted multiple times are labelled with hyperlinks.
Install / Use
/learn @wisdompeak/LeetCodeREADME
My YouTube Channel: LeetCode Daily Live Coding and Interpretation
My LeetCode Daily Problem & Contest Group: See rules and score board here
(If you are interested in joining this group, ping me guan.huifeng@gmail.com)
LeetCode难题代码和算法要点分析
目前分类目录
Two Pointers
011.Container-With-Most-Water (M+)
015.3Sum (M)
016.3Sum-Closet (M)
018.4Sum (M)
259.3Sum-Smaller (M+)
030.Substring-with-Concatenation-of-All-Words (H)
075.Sort-Colors (M+)
026.Remove Duplicates from Sorted Array (H-)
080.Remove Duplicates from Sorted Array II (H)
209.Minimum-Size-Subarray-Sum (M)
088.Merge Sorted Array (M)
283.Move-Zeroes (M)
141.Linked-List-Cycle (E+)
142.Linked-List-Cycle-II (M+)
360.Sort-Transformed-Array (M)
713.Subarray-Product-Less-Than-K (M+)
923.3Sum-With-Multiplicity (H-)
1234.Replace-the-Substring-for-Balanced-String (H-)
1498.Number-of-Subsequences-That-Satisfy-the-Given-Sum-Condition (H-)
1574.Shortest-Subarray-to-be-Removed-to-Make-Array-Sorted (H-)
1580.Put-Boxes-Into-the-Warehouse-II (H-)
1687.Delivering-Boxes-from-Storage-to-Ports (H)
1793.Maximum-Score-of-a-Good-Subarray (M+)
1989.Maximum-Number-of-People-That-Can-Be-Caught-in-Tag (M+)
2354.Number-of-Excellent-Pairs (H-)
2422.Merge-Operations-to-Turn-Array-Into-a-Palindrome (H-)
Sliding window
532.K-diff-Pairs-in-an-Array (H-)
611.Valid-Triangle-Number (M+)
930.Binary-Subarrays-With-Sum (M+)
1004.Max-Consecutive-Ones-III (M)
1052.Grumpy-Bookstore-Owner (M)
1358.Number-of-Substrings-Containing-All-Three-Characters (M)
1838.Frequency-of-the-Most-Frequent-Element (H-)
395.Longest-Substring-with-At-Least-K-Repeating-Characters (H)
1763.Longest-Nice-Substring (H)
2009.Minimum-Number-of-Operations-to-Make-Array-Continuous (M+)
2024.Maximize-the-Confusion-of-an-Exam (M)
424.Longest-Repeating-Character-Replacement (H-)
2106.Maximum-Fruits-Harvested-After-at-Most-K-Steps (H)
2401.Longest-Nice-Subarray (H-)
2411.Smallest-Subarrays-With-Maximum-Bitwise-OR (H-)
2516.Take-K-of-Each-Character-From-Left-and-Right (M+)
2564.Substring-XOR-Queries (H-)
2730.Find-the-Longest-Semi-Repetitive-Substring (M+)
2747.Count-Zero-Request-Servers (H-)
2831.Find-the-Longest-Equal-Subarray (M)
2953.Count-Complete-Substrings (H)
2958.Length-of-Longest-Subarray-With-at-Most-K-Frequency (M)
2968.Apply-Operations-to-Maximize-Frequency-Score (H-)
3234.Count-the-Number-of-Substrings-With-Dominant-Ones (H-)
3634.Minimum-Removals-to-Balance-Array (M+)Sliding window : Distinct Characters
076.Minimum-Window-Substring (M+)
003.Longest-Substring-Without-Repeating-Character (E+)
159.Longest-Substring-with-At-Most-Two-Distinct-Characters(H-)
340.Longest-Substring-with-At-Most-K-Distinct-Characters (H)
992.Subarrays-with-K-Different-Integers (H-)
3134.Find-the-Median-of-the-Uniqueness-Array (H-)
2461.Maximum-Sum-of-Distinct-Subarrays-With-Length-K (M)
2537.Count-the-Number-of-Good-Subarrays (M+)
3298.Count-Substrings-That-Can-Be-Rearranged-to-Contain-a-String-II (M+)
3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II (H-)
[3641.Long
