1.
Understand the Problem Deeply
Tip: If you can’t explain the problem clearly, you probably don’t understand it
well enough.
2. Think Before You Code
Tip: If a problem involves subarrays or substrings, consider Sliding Window or Two
Pointers.
3. Master Patterns, Not Just Problems
Sliding Window → Best for subarrays/substrings.
Two Pointers → Common in sorted arrays.
Binary Search → For sorted arrays or "min/max" problems.
Dynamic Programming (DP) → If you see "subproblems" or "choices".
Graph & BFS/DFS → If the problem involves grids or connectivity.
Tip: Instead of memorizing solutions, group problems by patterns and solve them
repeatedly.
4. Write Clean & Readable Code
Tip: Imagine someone else has to read your code—will they understand it easily?
5. Debug Like a Pro
Tip: If your solution is failing, check off-by-one errors, wrong variable updates,
or unhandled edge cases.
6. Analyze Time & Space Complexity
Tip: If a problem asks for an optimized solution, it usually needs O(n) or O(log
n), not O(n²).
7. Consistency Beats Everything
Tip: Solving 300+ well-chosen problems (across patterns) is usually enough for
FAANG-level prep.
Final Thought:
Think first, then code
Recognize patterns
Stay consistent