The following curated list is ordered by topics. Clicking on the question title takes you to the corresponding LeetCode submission page. Clicking on each Answer takes you to a short markdown file explaining my thought process, and an attached C++ program that is guaranteed to be correct on the LeetCode platform.
P.s. Safely ignore the "Status". It's for my personal use.
Status | Question & Submission Link | My C++ Implementation |
---|---|---|
✔ | Two Sum (Easy) | Answer |
✔ | Best Time to Buy and Sell Stock (Easy) | Answer |
✔ | Contains Duplicate (Easy) | Answer |
✔ | Maximum Subarray (Medium) | Answer |
✔ | Product of Array Except Self (Medium) | Answer |
✔ | Maximum Product Subarray (Medium) | Answer |
✔ | Find Minimum in Rotated Sorted Array (Medium) | Answer |
✔ | Search in Rotated Sorted Array (Medium) | Answer |
✔ | 3Sum (Medium) | Answer |
✔ | Container With Most Water (Medium) | Answer |
Status | Question & Submission Link | My C++ Implementation |
---|---|---|
✔ | Valid Anagram (Easy ) | Answer |
✔ | Valid Parentheses (Easy ) | Answer |
✔ | Valid Palindrome (Easy ) | Answer |
✔ | Longest Substring Without Repeating Characters (Medium ) | Answer |
✔ | Longest Repeating Character Replacement (Medium ) | Answer |
✔ | Group Anagrams (Medium ) | Answer |
✔ | Longest Palindromic Substring (Medium ) | Answer |
✔ | Palindromic Substrings (Medium ) | Answer |
✔ | Letter Combinations of a Phone Number (Medium ) | Answer |
✔ | Minimum Window Substring (Hard ) | Answer |
Status | Question & Submission Link | My C++ Implementation |
---|---|---|
✔ | Climbing Stairs (Easy) | Answer |
✔ | House Robber (Medium) | Answer |
✔ | Coin Change (Medium) | Answer |
✔ | Longest Increasing Subsequence (Medium) | Answer |
✔ | Longest Common Subsequence (Medium) | Answer |
✔ | Word Break (Medium) | Answer |
✔ | Combination Sum IV (Medium) | Answer |
✔ | House Robber II (Medium) | Answer |
✔ | Decode Ways (Medium) | Answer |
✔ | Unique Paths (Medium) | Answer |
✔ | Jump Game (Medium) | Answer |
Status | Question & Submission Link | My C++ Implementation |
---|---|---|
✔ | Reverse a Linked List (Easy) | Answer |
✔ | Detect Cycle in a Linked List (Easy) | Answer |
✔ | Merge Two Sorted Lists (Easy) | Answer |
✔ | Remove Nth Node From End Of List (Medium) | Answer |
✔ | Reorder List (Medium) | Answer |
Status | Question & Submission Link | My C++ Implementation |
---|---|---|
✔ | Merge Intervals (Medium) | Answer |
✔ | Non-overlapping Intervals (Medium) | Answer |
✔ | Insert Interval (Medium) | Answer |
Status | Question & Submission Link | My C++ Implementation |
---|---|---|
✔ | Set Matrix Zeroes (Medium) | Answer |
✔ | Spiral Matrix (Medium) | Answer |
✔ | Rotate Image (Medium) | Answer |
✔ | Word Search (Medium) | Answer |
Status | Question & Submission Link | My C++ Implementation |
---|---|---|
✔ | Top K Frequent Elements (Medium) | Answer |
✔ | Merge K Sorted Lists (Hard) | Answer |
✔ | Find Median from Data Stream (Hard) | Answer |
Status | Question & Submission Link | My C++ Implementation |
---|---|---|
✔ | Maximum Depth of Binary Tree (Easy) | Answer |
✔ | Same Tree (Easy) | Answer |
✔ | Invert Binary Tree (Easy) | Answer |
✔ | Subtree of Another Tree (Easy) | Answer |
✔ | Lowest Common Ancestor of BST (Easy) | Answer |
✔ | Binary Tree Level Order Traversal (Medium) | Answer |
✔ | Construct Binary Tree from Preorder and Inorder Traversal (Medium) | Answer |
✔ | Validate Binary Search Tree (Medium) | Answer |
✔ | Kth Smallest Element in a BST (Medium) | Answer |
✔ | Implement Trie, i.e. Prefix Tree (Medium) | Answer |
✔ | Add and Search Word (Medium) | Answer |
✔ | Binary Tree Maximum Path Sum (Hard) | Answer |
✔ | Serialize and Deserialize Binary Tree (Hard) | Answer |
❌ | Word Search II (Hard) | Answer |
Status | Question & Submission Link | My C++ Implementation |
---|---|---|
✔ | Number of Islands (Medium) | Answer |
✔ | Clone Graph (Medium) | Answer |
✔ | Course Schedule (Medium) | Answer |
✔ | Pacific Atlantic Water Flow (Medium) | Answer |
✔ | Longest Consecutive Sequence (Hard) | Answer |
Status | Question & Submission Link | My C++ Implementation |
---|---|---|
✔ | Sum of Two Integers (Easy) | Answer |
❌ | Number of 1 Bits (Easy) | Answer |
✔ | Missing Number (Easy) | Answer |
❌ | Reverse Bits (Easy) | Answer |
❌ | Counting Bits (Medium) | Answer |