All resources
Technical25 min read

Technical interview patterns

The recurring coding patterns behind most FAANG DSA questions — learn the pattern, not 500 problems.

Grinding random problems is inefficient. Almost every coding-round question is an instance of a known pattern. Learn to recognise the pattern from the problem statement and you turn "I have never seen this" into "this is a two-pointer problem".

The core patterns to master

Cover these and you can attack the large majority of DSA rounds.

  • Two pointers & sliding window — subarray/substring problems with a contiguous range.
  • Hashing — frequency counts, lookups, and de-duplication in O(1).
  • Binary search — sorted arrays, and "search the answer space" variants.
  • BFS / DFS — trees and graphs; level-order, connected components, shortest path.
  • Dynamic programming — overlapping subproblems; start with the recurrence.
  • Heaps — top-K, merge-K, and streaming-median problems.
  • Backtracking — permutations, combinations, and constraint satisfaction.

How to recognise the pattern

Train yourself to map signal words to patterns. "Contiguous subarray" or "longest substring" → sliding window. "Sorted" or "minimise the maximum" → binary search. "Top K" or "K closest" → heap. "All combinations / arrangements" → backtracking. "Number of ways" or "min/max over choices" → DP. Naming the pattern out loud is also a strong signal to the interviewer.

Practise by pattern, not at random

Do five to ten problems of one pattern back to back until the shape is automatic, then move on. This builds transferable recognition far faster than a shuffled list. Always re-derive the time and space complexity — interviewers will ask, and it is half the score.

Key takeaways

  • Most DSA questions are instances of ~7 patterns — learn the patterns.
  • Map signal words in the prompt to the pattern (e.g. "contiguous" → sliding window).
  • Practise one pattern in a block; always state complexity.

Put it into practice

Run an AI mock interview and get honest, real-time feedback. Free — bring your own AI key.

Start a practice interview