The overview of those problems is listed in follow. These problems are mainly divided into two parts, data structues and algorithms. The codes can be find in the corresponding folder in this repository.
- Problem and Solution:
- 242.Valid Anagram: problem description | solution
- 409.Longest Palindrome: problem description | solution
- 205.Isomorphic Strings: problem description | solution
- 647.Palindromic Substrings: problem description | solution
- 9.Palindrome Number: problem description | solution
- 696.Count Binary Substrings: problem description | solution
-
Problem and Solution:
- 160.Intersection of Two Linked Lists : problem description | solution
206. Reverse Linked List: problem description | solution- 21.Merge Two Sorted Lists: problem description | solution
- 83.Remove Duplicates from Sorted List: problem description | solution
- 19.Remove Nth Node From End of List: problem description | solution
- 24.Swap Nodes in Pairs: problem description | solution
- 445.Add Two Numbers II: problem description | solution
- 234.Palindrome Linked List: problem description | solution
- 725.Split Linked List in Parts: problem description | solution
- 328.Odd Even Linked List: problem description | solution
- Problem and Solution:
- 1.Two Sum: problem description | solution
- 594.Longest Harmonious Subsequence: problem description | solution
- 128.Longest Consecutive Sequence: problem description | solution
- Problem and Solution:
- 283.Move Zeroes: problem description | solution
- 566.Reshape the Matrix: problem description |
- 485.Max Consecutive Ones: problem description | solution
- 240.Search a 2D Matrix II: problem description | solution
- 378.Kth Smallest Element in a Sorted Matrix: problem description | solution
- 645.Set Mismatch: problem description | solution
- 287.Find the Duplicate Number: problem description | solution [Floyd's Tortoise and Hare Algorithm anlaysis]
- 667.Beautiful Arrangement II: problem description | solution
- 697.Degree of an Array: problem description | solution
- 766.Toeplitz Matrix: problem description | solution
- 565.Array Nesting: problem description | solution
769.Max Chunks To Make Sorted:problem description | solution
- Problem and Solution:
- 232.Implement Queue using Stacks: problem description | solution
- 225.Implement Stack using Queues: problem description | solution
- 155.Min Stack: problem description | solution
- 20.Valid Parentheses: problem description | solution
- 739.Daily Temperatures: problem description | solution [video explaination]
- 503.Next Greater Element II: problem description | solution
- Problems:
- 461.Hamming Distance: problem description | solution
- 136.Single Number: problem description | solution
- 268.Missing Number: problem description | solution
- 260.Single Number III: problem description | solution [analysis]
190.Reverse Bits:problem description | solution- 231.Power of Two: problem description | solution
- 342.Power of Four: problem description | solution
- 693.Binary Number with Alternating Bits: problem description | solution
- 476.Number Complement: problem description | solution
- 371.Sum of Two Integers problem description | solution
- 318.Maximum Product of Word Lengths problem description | solution
338.Counting Bits:problem description | solution
-
Basic:
- 104.Maximum Depth of Binary Tree: problem description | solution
110.Balanced Binary Tree: problem description | solution- 543.Diameter of Binary Tree: problem description | solution
- 226.Invert Binary Tree: problem description | solution
- 617.Merge Two Binary Trees: problem description | solution
-
- Path Sum problem description | solution
-
- Path Sum III problem description | solution
-
- Subtree of Another Tree problem description | solution
-
- Symmetric Tree problem description | solution
- 111. Minimum Depth of Binary Tree problem description | solution
-
Traverse a tree:
- 637.Average of Levels in Binary Tree: problem description | solution
- 513.Find Bottom Left Tree Value: problem description | solution
- 144.Binary Tree Preorder Traversal: problem description | solution
- 145.Binary Tree Postorder Traversal: problem description | solution
- 94.Binary Tree Inorder Traversal: problem description | solution
-
BST
- 669.Trim a Binary Search Tree: problem description | solution
- 230.Kth Smallest Element in a BST: problem description | solution
- 538.Convert BST to Greater Tree: problem description | solution
- 235.Lowest Common Ancestor of a Binary Search Tree: problem description | solution
- 236.Lowest Common Ancestor of a Binary Tree: problem description | solution[analysis]
- 108.Convert Sorted Array to Binary Search Tree: problem description | solution
- 109.Convert Sorted List to Binary Search Tree: problem description | solution
- 653.Two Sum IV problem description | solution
- 530.Minimum Absolute Difference in BST problem description | solution
- 501.Find Mode in Binary Search Tree problem description | solution
-
Trie
- 208. Implement Trie: problem description | solution
- 677. Map Sum Pairs: problem description | solution
- Problem and Solution:
- 785.Is Graph Bipartite?: problem description | solution
- 207.Course Schedule: problem description | solution
- 210.Course Schedule II: problem description | solution
684.Redundant Connection: problem description | solution
- Problem and Solution:
- 167.Two Sum II: problem description | solution
- 633.Sum of Square Numbers: problem description | solution
- 345.Reverse Vowels of a String: problem description | solution
- 680.Valid Palindrome II: problem description | solution
- 88.Merge Sorted Array: problem description | solution
- 141.Linked List Cycle: problem description | solution
- 524.Longest Word in Dictionary through Deleting: problem description | solution
-
BFS
- 1091.Shortest Path in Binary Matrix: problem description | solution
- 279.Perfect Squares: problem description | solution
- 127.Word Ladder: problem description | solution
-
DFS
- 695.Max Area of Island: problem description | solution
- 200.Number of Islands: problem description | solution
- 547.Friend Circles: problem description | solution
- 130.Surrounded Regions: problem description | solution
- 417.Pacific Atlantic Water Flow: problem description | solution
-
Backtracking
- 17.Letter Combinations of a Phone Number: problem description | solution
- 93.Restore IP Addresses(not important): problem description | solution
- 79.Word Search: problem description | solution
- 257.Binary Tree Paths: problem description | solution
- 46.Permutations: problem description | solution
47.Permutations II:problem description | solution- 77.Combinations: problem description | solution
-
- Combination Sum(similar to 46): problem description | solution
-
- Combination Sum II(similar to 47): problem description | solution
- 216.Combination Sum III: problem description | solution
- 78.Subsets: problem description | solution
- 90.Subsets II: problem description | solution[analysis]
-
Binary Search
- 69.Sqrt(x): problem description | solution
- 744.Find Smallest Letter Greater Than Target: problem description | solution
- 540.Single Element in a Sorted Array: problem description | solution
- 278.First Bad Version: problem description | solution
- 153.Find Minimum in Rotated Sorted Array: problem description | solution
- 34.Find First and Last Position of Element in Sorted Array: problem description | solution
- Problem and Solution:
- 215.Kth Largest Element in an Array: problem description | solution
- 347.Top K Frequent Elements: problem description | solution
- 451.Sort Characters By Frequency: problem description | solution
- 75.Sort Colors: problem description | solution
- Problem and Solution:
- 241.Different Ways to Add Parentheses: problem description | solution
- 95.Unique Binary Search Trees II: problem description | solution
- Problem and Solution:
- 455.Assign Cookies: problem description | solution
- 435.Non-overlapping Intervals: problem description | solution
- 452.Minimum Number of Arrows to Burst Balloons: problem description | solution
- 406.Queue Reconstruction by Height: problem description
- 121.Best Time to Buy and Sell Stock: problem description | solution
- 122.Best Time to Buy and Sell Stock II: problem description | solution
- 605.Can Place Flowers: problem description | solution
- 392.Is Subsequence: problem description | solution
- 665.Non-decreasing Array: problem description | solution
- 53.Maximum Subarray: problem description | solution
- 763.Partition Labels: problem description | solution
- Problem and Solution:
- 70.Climbing Stairs: problem description | solution
- 198.House Robber: problem description | solution
- 213.House Robber II: problem description | solution
- 64.Minimum Path Sum: problem description | solution
- 62.Unique Paths: problem description | solution
- 303.Range Sum Query: problem description | solution
- 413.Arithmetic Slices: problem description | solution
- 343.Integer Break: problem description | solution
- 279.Perfect Squares: problem description | solution
- 91.Decode Ways: problem description | solution
- 300.Longest Increasing Subsequence: problem description | solution
- 646.Maximum Length of Pair Chain(similar to 300): problem description | solution
- 376.Wiggle Subsequence: problem description | solution
1143.Longest Common Subsequence:problem description | solution- 416.Partition Equal Subset Sum: problem description | solution
- 494.Target Sum: problem description | solution
474.Ones and Zeroes:problem description | solution- 322.Coin Change: problem description | solution
- 518.Coin Change 2: problem description | solution
- Problem and Solution
The filtered list comes from CyC2018. you can also find the java solutions for it there.