Curated List of Top 75 LeetCode
Problem | Difficulty | Category | Tags | LeetCode |
---|---|---|---|---|
[Two Sum] | Array |
Array , Hash Table |
π | |
[Best Time to Buy and Sell Stock] | Array |
Array , Dynamic Programming |
π | |
[Contains Duplicate] | Array |
Array , Hash Table , Sorting |
π | |
[Product of Array Except Self] | Array |
Array , Prefix Sum |
π | |
[Maximum Subarray] | Array |
Array , Divide and Conquer , Dynamic Programming |
π | |
[Maximum Product Subarray] | Array |
Array , Dynamic Programming |
π | |
[Find Minimum in Rotated Sorted Array] | Array |
Array , Binary Search |
π | |
[Search in Rotated Sorted Array] | Array |
Array , Binary Search |
π | |
[3Sum] | Array |
Array , Two Pointers , Sorting |
π | |
[Container With Most Water] | Array |
Array , Two Pointers , Greedy |
π | |
[Sum of Two Integers] | Binary |
Math , Bit Manipulation |
π | |
[Number of 1 Bits] | Binary |
Divide and Conquer , Bit Manipulation |
π | |
[Counting Bits] | Binary |
Dynamic Programming , Bit Manipulation |
π | |
[Missing Number] | Binary |
Array , Hash Table , Math , Binary Search , Bit Manipulation , Sorting |
π | |
[Reverse Bits] | Binary |
Divide and Conquer , Bit Manipulation |
π | |
[Climbing Stairs] | Dynamic Programming |
Math , Dynamic Programming , Memorization |
π | |
[Coin Change] | Dynamic Programming |
Array , Dynamic Programming , Breadth-First-Search |
π | |
[Longest Increasing Subsequence] | Dynamic Programming |
Array , Binary Search , Dynamic Programming |
π | |
[Longest Common Subsequence] | Dynamic Programming |
String , Dynamic Programming |
π | |
[Word Break Problem] | Dynamic Programming |
Array , Hash Table , String , Dynamic Programming , Trie , Memorization |
π | |
[Combination Sum IV] | Dynamic Programming |
Array , Dynamic Programming |
π | |
[House Robber] | Dynamic Programming |
Array , Dynamic Programming |
π | |
[House Robber II] | Dynamic Programming |
Array , Dynamic Programming |
π | |
[Decode Ways] | Dynamic Programming |
String , Dynamic Programming |
π | |
[Unique Paths] | Dynamic Programming |
Math , Dynamic Programming , Combinatorics |
π | |
[Jump Game] | Dynamic Programming |
Array , Dynamic Programming , Greedy |
π | |
[Clone Graph] | Graph |
Hash Table , Depth-First-Search , Breadth-First-Search , Graph |
π | |
[Course Schedule] | Graph |
Depth-First-Search , Breadth-First-Search , Graph , Topological Sort |
π | |
[Pacific Atlantic Water Flow] | Graph |
Array , Depth-First-Search , Breadth-First-Search , Matrix |
π | |
[Number of Islands] | Graph |
Array , Depth-First-Search , Breadth-First-Search , Union Find , Matrix |
π | |
[Longest Consecutive Sequence] | Graph |
Array , Hash Table , Union Find |
π | |
[Alien Dictionary (Leetcode Premium)] | Graph |
π | ||
[Graph Valid Tree (Leetcode Premium)] | Graph |
π | ||
[Number of Connected Components in an Undirected Graph (Leetcode Premium)] | Graph |
π | ||
[Insert Interval] | Interval |
Array |
π | |
[Merge Intervals] | Interval |
Array , Sorting |
π | |
[Non-overlapping Intervals] | Interval |
Array , Dynamic Programming , Greedy , Sorting |
π | |
[Meeting Rooms (Leetcode Premium)] | Interval |
π | ||
[Meeting Rooms II (Leetcode Premium)] | Interval |
π | ||
[Reverse a Linked List] | Linked List |
Linked List , Recursion |
π | |
[Detect Cycle in a Linked List] | Linked List |
Hash Table , Linked List , Two Pointers |
π | |
[Merge Two Sorted Lists] | Linked List |
Linked List , Recursion |
π | |
[Merge K Sorted Lists] | Linked List |
Linked List , Divide and Conquer , Heap(Priority Queue) , Merge Sort |
π | |
[Remove Nth Node From End Of List] | Linked List |
Linked List , Two Pointers |
π | |
[Reorder List] | Linked List |
Linked List , Two Pointers , Stack , Recursion |
π | |
[Set Matrix Zeroes] | Matrix |
Array , Hash Table , Matrix |
π | |
[Spiral Matrix] | Matrix |
Array , Matrix , Simulation |
π | |
[Rotate Image] | Matrix |
Array , Math , Matrix |
π | |
[Word Search] | Matrix |
Array , Backtracking , Matrix |
π | |
[Longest Substring Without Repeating Characters] | String |
Hash Table , String , Sliding Window |
π | |
[Longest Repeating Character Replacement] | String |
Hash Table , String , Sliding Window |
π | |
[Minimum Window Substring] | String |
Hash Table , String , Sliding Window |
π | |
[Valid Anagram] | String |
Hash Table , String , Sorting |
π | |
[Group Anagrams] | String |
Array , Hash Table , String , Sorting |
π | |
[Valid Parentheses] | String |
String , Stack |
π | |
[Valid Palindrome] | String |
Two Pointer , String |
π | |
[Longest Palindromic Substring] | String |
String , Dynamic Programming |
π | |
[Palindromic Substrings] | String |
String , Dynamic Programming |
π | |
[Encode and Decode Strings (Leetcode Premium)] | String |
π | ||
[Maximum Depth of Binary Tree] | Tree |
Tree , Depth-First-Search , Breadth-First-Search , Binary Tree |
π | |
[Same Trees] | Tree |
Tree , Depth-First-Search , Breadth-First-Search , Binary Tree |
π | |
[Invert/Flip Binary Tree] | Tree |
Depth-First-Search , Breadth-First-Search , Binary Tree |
π | |
[Binary Tree Maximum Path Sum] | Tree |
Dynamic Programming , Tree , Depth-First-Search , Binary Tree |
π | |
[Binary Tree Level Order Traversal] | Tree |
Tree , Breadth-First-Search , Binary Tree |
π | |
[Serialize and Deserialize Binary Tree] | Tree |
String , Tree , Depth-First-Seaarch , Breadth-First-Search , Design , Binary Tree |
π | |
[Subtree of Another Tree] | Tree |
Tree , Depth-First-Search , String Matching , Binary Tree , Hash Function |
π | |
[Construct Binary Tree from Preorder and Inorder Traversal] | Tree |
Array , Hash Table , Divide and Conquer , Tree , Binary Tree |
π | |
[Validate Binary Search Tree] | Tree |
Tree , Depth-First-Search , Binary Search Tree , Binary Tree |
π | |
[Kth Smallest Element in a BST] | Tree |
Tree , Depth-First-Search , Binary Search Tree , Binary Tree |
π | |
[Lowest Common Ancestor of BST] | Tree |
Tree , Depth-First-Search , Binary Search Tree , Binary Tree |
π | |
[Implement Trie (Prefix Tree)] | Tree |
Hash Table , String , Design , Trie |
π | |
[Add and Search Word] | Tree |
String , Depth-First Search , Design , Trie |
π | |
[Word Search II] | Tree |
Array , String , Backtracking , Trie , Matrix |
π | |
[Merge K Sorted Lists] | Heap |
Linked List , Divide and Conquer , Heap(Priority Queue) , Merge Sort |
π | |
[Top K Frequent Elements] | Heap |
Array , Hash Table , Divide and Conquer , Bucket Sort , Counting |
π | |
[Find Median from Data Stream] | Heap |
Two Pointers , Design , Sorting , Heap , Data Stream |
π |