tech-notes-and-questions

Problem Solving Techniques

  1. Dynamic Programming (DP)
  2. Backtracking
  3. Greedy Approach
  4. Divide and Conquer
  5. Branch and Bound
  6. Recursion
  7. Memoization
  8. Exhaustive Search / Brute Force
  9. Two-Pointer Technique
  10. Sliding Window Technique
  11. Binary Search
  12. Hashing
  13. Union-Find (Disjoint Set Union)
  14. Priority Queue / Heaps
  15. Mathematical Techniques
  16. Graph Algorithms
  17. Bit Manipulation
  18. Heuristic Methods
  19. Exhaustive Search / Brute Force
  20. Simulation

1. Dynamic Programming (DP)

When to use:

How it works:

Examples:

Key Characteristics:


</br>

2. Backtracking

When to use:

How it works:

Examples:

Key Characteristics:


</br>

3. Greedy Approach

When to use:

How it works:

Examples:

Key Characteristics:


</br>

4. Divide and Conquer

When to use:

How it works:

Examples:

Key Characteristics:


</br>

9. Two-Pointer Technique

When to use:

Useful for problems involving arrays or linked lists where you need to find pairs, triplets, or subarrays with specific properties.

How it works:

Examples:

Key Points:

10. Sliding Window Technique

When to use:

When dealing with contiguous subarrays or substrings in problems related to sums, averages, or specific properties of the window.

How it works:

Examples: