Skip to content

Data Structures and Algorithms

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
  2. Linear Search
  3. Binary Search

  4. Sorting Algorithms

  5. Bubble Sort
  6. Insertion Sort
  7. Selection Sort
  8. Merge Sort
  9. Quick Sort
  10. Counting Sort
  11. Radix Sort
  12. Heap Sort

  13. Recursion & Backtracking

  14. Factorial / Fibonacci
  15. Subset Generation
  16. Permutations / Combinations
  17. N-Queens
  18. Maze / Backtracking Pathfinding
  19. Palindrome Partitioning

  20. Dynamic Programming (DP)

  21. Memoization vs Tabulation
  22. 1D DP (Fibonacci, House Robber)
  23. 2D DP (Grid problems, Unique Paths)
  24. DP on Strings (Edit Distance, LCS, Palindromes)
  25. DP on Subsets / Knapsack

  26. Greedy Algorithms

  27. Activity Selection / Intervals
  28. Jump Game
  29. Minimum Platforms

  30. Graph Algorithms

  31. BFS (shortest path in unweighted)
  32. DFS (traversal, connected components)
  33. Dijkstra’s Algorithm (shortest path in weighted)
  34. Bellman-Ford (for negative weights)
  35. Floyd-Warshall (all pairs shortest path)
  36. Union-Find / Disjoint Set (cycle detection, Kruskal)

  37. Sliding Window / Two Pointers

  38. Fixed Window Size (max sum, average, etc.)
  39. Variable Window (min/max subarray length)
  40. 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