- 1. Introduction
- 2. Arrays and Hashing
- 2.1. Contains Duplicate
- 2.2. Valid Anagram
- 2.3. Two Sum
- 2.4. Group Anagrams
- 2.5. Top K Frequent Elements
- 2.6. Product of Array Except Self
- 2.7. Valid Sudoku
- 2.8. Encode and Decode Strings
- 2.9. Longest Consecutive Sequence
- 3. Two Pointers
- 3.1. Valid Palindrome
- 3.2. Two Sum II - Input Array Is Sorted
- 3.3. 3Sum
- 3.4. Container With Most Water
- 3.5. Trapping Rain Water
- 4. Sliding Window
- 4.1. Best Time to Buy and Sell Stock
- 4.2. Longest Substring Without Repeating Characters
- 4.3. Longest Repeating Character Replacement
- 4.4. Permutation in String
- 4.5. Minimum Window Substring
- 4.6. Sliding Window Maximum
- 5. Stack
- 5.1. Valid Parentheses
- 5.2. Min Stack
- 5.3. Evaluate Reverse Polish Notation
- 5.4. Generate Parentheses
- 5.5. Daily Temperatures
- 5.6. Car Fleet
- 5.7. Largest Rectangle In Histogram
- 6. Binary Search
- 6.1. Binary Search
- 6.2. Search a 2D Matrix
- 6.3. Koko Eating Bananas
- 6.4. Find Minimum In Rotated Sorted Array
- 6.5. Search In Rotated Sorted Array
- 6.6. Time Based Key Value Store
- 6.7. Median of Two Sorted Arrays
- 7. Linked List
- 7.1. Reverse Linked List
- 7.2. Merge Two Sorted Lists
- 7.3. Reorder List
- 7.4. Remove Nth Node From End of List
- 7.5. Copy List With Random Pointer
- 7.6. Add Two Numbers
- 7.7. Linked List Cycle
- 7.8. Find The Duplicate Number
- 7.9. LRU Cache
- 7.10. Merge K Sorted Lists
- 7.11. Reverse Nodes In K Group
- 8. Trees
- 8.1. Invert Binary Tree
- 8.2. Maximum Depth of Binary Tree
- 8.3. Diameter of Binary Tree
- 8.4. Balanced Binary Tree
- 8.5. Same Tree
- 8.6. Subtree of Another Tree
- 8.7. Lowest Common Ancestor of a Binary Search Tree
- 8.8. Binary Tree Level Order Traversal
- 8.9. Binary Tree Right Side View
- 8.10. Count Good Nodes In Binary Tree
- 8.11. Validate Binary Search Tree
- 8.12. Kth Smallest Element In a BST
- 8.13. Construct Binary Tree from Preorder and Inorder Traversal
- 8.14. Binary Tree Maximum Path Sum
- 8.15. Serialize and Deserialize Binary Tree
- 9. Tries
- 9.1. Implement Trie Prefix Tree
- 9.2. Design Add and Search Words Data Structure
- 9.3. Word Search II
- 10. Heap Priority Queues
- 10.1. Kth Largest Element in a Stream
- 10.2. Last Stone Weight
- 10.3. K Closest Points to Origin
- 10.4. Kth Largest Element in an Array
- 10.5. Task Scheduler
- 10.6. Design Twitter
- 10.7. Find Median from Data Stream
- 11. Backtracking
- 11.1. Subsets
- 11.2. Combination Sum
- 11.3. Permutations
- 11.4. Subsets II
- 11.5. Combination Sum II
- 11.6. Word Search
- 11.7. Palindrome Partitioning
- 11.8. Letter Combinations of a Phone Number
- 11.9. N Queens
- 12. Graphs
- 12.1. Number of Islands
- 12.2. Clone Graph
- 12.3. Max Area of Island
- 12.4. Pacific Atlantic Water Flow
- 12.5. Surrounded Regions
- 12.6. Rotting Oranges
- 12.7. Walls and Gates
- 12.8. Course Schedule
- 12.9. Course Schedule II
- 12.10. Redundant Connection
- 12.11. Number of Connected Components in an Undirected Graph
- 12.12. Graph Valid Tree
- 12.13. Word Ladder
- 13. Advanced Graphs
- 13.1. Reconstruct Itinerary
- 13.2. Min Cost to Connect All Points
- 13.3. Network Delay Time
- 13.4. Swim in Rising Water
- 13.5. Alien Dictionary
- 13.6. Cheapest Flights Within K Stops
- 14. 1-D Dynamic Programming
- 14.1. Climbing Stairs
- 14.2. Min Cost Climbing Stairs
- 14.3. House Robber
- 14.4. House Robber II
- 14.5. Longest Palindromic Substring
- 14.6. Palindromic Substrings
- 14.7. Decode Ways
- 14.8. Coin Change
- 14.9. Maximum Product Subarray
- 14.10. Word Break
- 14.11. Longest Increasing Subsequence
- 14.12. Partition Equal Subset Sum
- 15. 2-D Dynamic Programming
- 15.1. Unique Paths
- 15.2. Longest Common Subsequence
- 15.3. Best Time to Buy And Sell Stock With Cooldown
- 15.4. Coin Change II
- 15.5. Target Sum
- 15.6. Interleaving String
- 15.7. Longest Increasing Path In a Matrix
- 15.8. Distinct Subsequences
- 15.9. Edit Distance
- 15.10. Burst Balloons
- 15.11. Regular Expression Matching
- 16. Greedy
- 16.1. Maximum Subarray
- 16.2. Jump Game
- 16.3. Jump Game II
- 16.4. Gas Station
- 16.5. Hand of Straights
- 16.6. Merge Triplets to Form Target Triplet
- 16.7. Partition Labels
- 16.8. Valid Parenthesis String
- 17. Intervals
- 17.1. Insert Interval
- 17.2. Merge Intervals
- 17.3. Non Overlapping Intervals
- 17.4. Meeting Rooms
- 17.5. Meeting Rooms II
- 17.6. Minimum Interval to Include Each Query
- 18. Math and Geometry
- 18.1. Rotate Image
- 18.2. Spiral Matrix
- 18.3. Set Matrix Zeroes
- 18.4. Happy Number
- 18.5. Plus One
- 18.6. Pow(x,n)
- 18.7. Multiply Strings
- 18.8. Detect Squares
- 19. Bit Manipulation
- 19.1. Single Number
- 19.2. Number of 1 Bits
- 19.3. Counting Bits
- 19.4. Reverse Bits
- 19.5. Missing Number
- 19.6. Sum of Two Integers
- 19.7. Reverse Integer