/Leetcode-Notes

Notes and solutions for Neetcode questions

My Leetcode notes and solutions

These questions are taken from neetcode.io

The question maked as "blind" are from famous Blind 75 list.

Table of Questions

  1. Array and Hasing
    1. Contains Duplicate (Blind)
    2. Valid Anagram (Blind)
    3. Two Sum (Blind)
    4. Group Anagrams (Blind)
    5. Top K Frequent Elements (Blind)
    6. Product of Array Except Self (Blind)
    7. Valid Sudoku
    8. Encode and Decode Strings (Blind)
    9. Longest Consecutive Sequence (Blind)
  2. Two Pointers
    1. Valid Palindrome (Blind)
    2. Two Sum II
    3. 3Sum (Blind)
    4. Container With Most Water (Blind)
    5. Trapping Rain Water
  3. Sliding Window
    1. Best Time to Buy and Sell Stock (Blind)
    2. Longest Substring Without Repeating Characters (Blind)
    3. Longest Repeating Character Replacement (Blind)
    4. Permutation in String
    5. Minimum Window Substring (Blind)
    6. Sliding Window Maximum
  4. Stack
    1. Valid Parentheses (Blind)
    2. Min Stack
    3. Evaluate Reverse Polish Notation
    4. Generate Parentheses
    5. Daily Temperatures
    6. Car Fleet
    7. Largest Rectangle in Histogram
  5. Binary Search
    1. Binary Search
    2. Search a 2D Matrix
    3. Koko Eating Bananas
    4. Search in Rotated Sorted Array (Blind)
    5. Find Minimum in Rotated Sorted Array (Blind)
    6. Time Based Key-Value Store
    7. Median of Two Sorted Arrays
  6. Linked List
    1. Reverse Linked List (Blind)
    2. Merge Two Sorted Lists (Blind)
    3. Reorder List (Blind)
    4. Remove Nth Node From End of List (Blind)
    5. Copy List with Random Pointer
    6. Add Two Numbers
    7. Linked List Cycle (Blind)
    8. Find the Duplicate Number
    9. LRU Cache
    10. Merge k Sorted Lists (Blind)
    11. Reverse Nodes in k-Group
  7. Trees
    1. Invert Binary Tree (Blind)
    2. Maximum Depth of Binary Tree (Blind)
    3. Diameter of Binary Tree
    4. Balanced Binary Tree
    5. Same Tree (Blind)
    6. Subtree of Another Tree (Blind)
    7. Lowest Common Ancestor of a Binary Search Tree (Blind)
    8. Binary Tree Level Order Traversal (Blind)
    9. Binary Tree Right Side View
    10. Count Good Nodes in Binary Tree
    11. Validate Binary Search Tree (Blind)
    12. Kth Smallest Element in a BST (Blind)
    13. Construct Binary Tree from Preorder and Inorder Traversal (Blind)
    14. Binary Tree Maximum Path Sum (Blind)
    15. Serialize and Deserialize Binary Tree (Blind)
  8. Trie
    1. Implement Trie (Blind)
    2. Design Add and Search Words Data Structure (Blind)
    3. Word Search II (Blind)
  9. Heap and Priority Queue
    1. Kth Largest Element in a Stream
    2. Last Stone Weight
    3. K Closest Points to Origin
    4. Kth Largest Element in an Array
    5. Task Scheduler
    6. Design Twitter
    7. Find Median from Data Stream (Blind)
  10. Backtracking
    1. Permutations
    2. Sudoku Solver
    3. Subsets
    4. Combination Sum (Blind)
    5. Subsets II
    6. Word Search (Blind)
    7. Palindrome Partitioning
    8. Letter Combinations of a Phone Number
    9. N-Queens
  11. Graphs
    1. Number of Islands (Blind)
    2. Clone Graph (Blind)
    3. Max Area of Island
    4. Pacific Atlantic Water Flow (Blind)
    5. Surrounded Regions
    6. Rotting Oranges
    7. Walls and Gates
    8. Course Schedule (Blind)
    9. Course Schedule II
    10. Redundant Connection
    11. Number of Connected Components In An Undirected Graph (Blind)
    12. Graph Valid Tree (Blind)
    13. Word Ladder
  12. Advance Graphs
    1. Reconstruct Itinerary