Code-Memo

Data Structures

  1. Linear Data Structures
    1. Arrays
    2. Strings
    3. Linked list
    4. Stack
    5. Queues
  2. Trees
    1. Binary Trees
    2. Binary Search Trees (BST)
    3. AVL Trees
    4. Trie
    5. N-ary Trees
  3. Hash Tables
    1. Hashmap
    2. HashSet
  4. Graphs
    1. Adjacency List
    2. Adjacency Matrix
  5. Heaps
    1. Heaps

Algorithms

  1. Searching Algorithms
    1. Linear Search
    2. Binary Search
  2. Sorting Algorithms
    1. Bubble Sort
    2. Insertion Sort
    3. Selection Sort
    4. Merge Sort
    5. Quick Sort
    6. Counting Sort
    7. Radix Sort
    8. Heap Sort
  3. Recursion & Backtracking
    1. Factorial / Fibonacci
    2. Subset Generation
    3. Permutations / Combinations
    4. N-Queens
    5. Maze / Backtracking Pathfinding
    6. Palindrome Partitioning
  4. Dynamic Programming (DP)
    1. Memoization vs Tabulation
    2. 1D DP (Fibonacci, House Robber)
    3. 2D DP (Grid problems, Unique Paths)
    4. DP on Strings (Edit Distance, LCS, Palindromes)
    5. DP on Subsets / Knapsack
  5. Greedy Algorithms
    1. Activity Selection / Intervals
    2. Jump Game
    3. Minimum Platforms
  6. Graph Algorithms
    1. BFS (shortest path in unweighted)
    2. DFS (traversal, connected components)
    3. Dijkstra’s Algorithm (shortest path in weighted)
    4. Bellman-Ford (for negative weights)
    5. Floyd-Warshall (all pairs shortest path)
    6. Union-Find / Disjoint Set (cycle detection, Kruskal)
  7. Sliding Window / Two Pointers
    1. Fixed Window Size (max sum, average, etc.)
    2. Variable Window (min/max subarray length)
    3. Two Pointers for Sorted Arrays

LeetCode Problems

Some people focus on memorizing various algorithms, which can be beneficial at times but may also can be harmful to their problem-solving skills. Others rely only on problem-solving and might spend 10 hours on a single problem without finding a solution.

The most effective approach to solving coding problems combines both problem-solving skills and algorithm memorization. Instead of memorizing the exact code, you should be prepared to write any algorithm as needed. In other words, problem-solving is about recognizing patterns and knowing which algorithm to apply and implement.

Arrays and Hashing

  1. Contains Duplicate
  2. Contains Duplicate II
  3. Two Sum
  4. Two Sum II
  5. Maximum Subarray ⏳
  6. Best Time to Buy and Sell Stock ⏳
  7. Product of Array Except Self ⏳
  8. Group Anagrams
  9. Maximum Product Subarray ⏳
  10. Find Minimum in Rotated Sorted Array ⏳
  11. Search in Rotated Sorted Array ⏳
  12. Container With Most Water ⏳

Two Pointers

  1. Valid Palindrome
  2. Container With Most Water
  3. Longest Palindromic Substring

Stack

  1. Valid Parentheses
  2. Daily Temperatures

Sliding Window

  1. Best Time to Buy and Sell Stock
  2. Longest Substring Without Repeating Characters

Linked Lists

  1. Reverse Linked List
  2. Merge Two Sorted Lists
  3. Reorder List
  1. Binary Search

Trees

  1. Invert Binary Tree
  2. Maximum Depth of Binary Tree

Tries

  1. Implement Trie (Prefix Tree)


Time Complexity Graphs

Time Complexity Graphs Time Complexity Graphs