DSA Problem-Solving Checklist (To Train Patterns)

D

Qubits of DPK

April 11, 2026

Core DSA

1. Understand & Restate the Problem

  • What is the input?
  • What is the output?
  • What exactly is being asked?
  • Restate in your own simple words (this makes sure you really understand).

2. Identify Constraints

  • Input size? (Helps decide if brute force is possible or not)
  • Value limits? (Helps decide data types, possible overflows, modulo, etc.)
  • Is the input sorted, unique, graph, string, etc.?

3. Classify the Problem (Pattern Recognition)

  • Which category does it belong to?
  • Why? (state one line: “I see overlapping subproblems → DP”).

4. Brute Force Approach

  • Think: “If constraints were very small, how would I solve it?”
  • Outline steps.
  • Analyze time & space.

5. Optimized Approach

  • Think: “How do I reduce repeated work?”
  • Patterns:
  • Write the high-level idea first (not code).

6. Base Cases / Edge Cases

  • What’s the smallest valid input?
  • Any tricky cases (empty array, negative numbers, single element, max constraints)?
  • Handle them explicitly.

7. Step-by-Step Logic (in Plain English)

  • Before coding, explain your algorithm like teaching a 10-year-old.
  • Example: “Loop through array, keep a running sum, if I’ve seen (sum-k) before, then subarray exists.”

8. Code Skeleton

  • Write pseudocode first.
  • Then convert into real code.
  • Keep functions small & clear.

9. Dry Run Example

  • Use small input and simulate manually.
  • Make a table: variables changing at each step, final result.
  • Do at least one normal case + one edge case.

10. Complexity Analysis

  • Time complexity (Big-O).
  • Space complexity (extra structures, recursion depth).
  • Justify why.

11. Real-World Analogy (Optional but Powerful)

  • Relate to something intuitive.

12. Interview Tips

  • Always say your thought process out loud.
  • Start with brute force → then optimize.
  • Mention trade-offs (time vs. space).
  • Don’t jump to code immediately.