DSA interview questions

Blind 75 Interview Questions

Curated problem lists survive because they overlap with what companies actually reuse—not because any list is complete. Treat Blind 75 as a map of gaps, not a trophy case. The goal is not a green checkmark on every row; it is instant pattern recognition, clean implementation, and the ability to explain why your approach beats the naive one when an interviewer pokes at it.

A smarter way to grind

What to do when you "already did" a problem

Change the constraints: solve it in-place, optimize space, handle duplicates differently, or explain how you would test it with property-based fuzzing. Senior loops sometimes look like familiar skins on old bones; your flexibility matters more than whether you remember solution 417 from a spreadsheet.

Connect to the rest of your prep

Pair list work with focused hubs— sliding window, tree traversals—so you are not only grinding isolated nodes. If system design is on your loop, leave energy for architecture; sleep-deprived grinding has diminishing returns everyone can hear in your voice.

When the pattern saved a release

Two pointers on sorted data (merge meeting rooms vibe)

def merge_intervals(intervals):
    intervals.sort(key=lambda x: x[0])
    out = [intervals[0]]
    for s, e in intervals[1:]:
        last_s, last_e = out[-1]
        if s <= last_e:
            out[-1] = (last_s, max(last_e, e))
        else:
            out.append((s, e))
    return out

Calendar conflicts for Azure DevOps deployment windows, maintenance slots across regions, or support rotations—same merge pattern. In the interview, say "sort by start, sweep, extend or push"—then mention how you validated with property tests on messy ICS imports.

Questions with sample answers

These are interview-ready outlines—sound human by swapping in your own metrics, team names, and war stories. The examples are generic on purpose so you can map them to what you actually shipped.

  1. Primary prompt

    Rotate a sorted array that was rotated at an unknown pivot—derive complexity and edge cases.

    Binary search on answer property: compare mid with right to find sorted half; min lies in unsorted side or at mid. O(log n) time, O(1) space. Duplicates break pure binary search—may need O(n) worst case or shrink bounds linearly when nums[mid]===nums[right].

    Edges: n=1, no rotation, all equal elements.

  2. Primary prompt

    Merge overlapping intervals—how do you prove correctness of your sort key?

    Sort by start time. Greedily merge: for each interval, if start ≤ last end, extend end; else push new. Correct because any overlap must chain from earliest conflicting start after sorting.

  3. Primary prompt

    Detect a cycle in a linked list with O(1) memory—then discuss what breaks if the list is mutated concurrently (conceptual).

    Floyd's tortoise and hare: if fast meets slow, cycle exists. If concurrent mutation, pointers can skip or revisit nodes unpredictably—algorithm assumes stable structure; production uses versioning or locks for iteration.

  4. Primary prompt

    Word ladder length: outline how you would approach it under time pressure and where BFS fits.

    Model as graph: edges between words one edit apart; BFS from beginWord to endWord gives shortest path length. Optimize with neighbor generation (26×length) or precomputed adjacency for small dictionary. Bidirectional BFS if both ends known.

Follow-ups interviewers often ask

Expect nested "why?" questions—brief answers here; expand with your production defaults.

  1. Follow-up

    What is your personal checklist before you lock in a pattern?

    Constraints (n, value range), sorted?, need indices or only existence, negative numbers, duplicates, space budget, can I sort input—then match to two pointers, binary search, BFS, etc.

  2. Follow-up

    How do you validate on paper for n = 0, 1, 2?

    Trace algorithm manually; ensure no off-by-one on empty or single-element; verify return semantics (0 vs -1 vs empty list).

  3. Follow-up

    If you had five extra minutes, what test cases would you add?

    Max values, duplicates, already sorted, reverse sorted, ties, multiple valid answers—pick ones that stress my invariant.

  4. Follow-up

    Which problem on your list still feels fuzzy—why?

    Honesty wins: name one (e.g. bitmask DP) and say you'd revisit recurrence before interview—shows maturity.

  5. Follow-up

    How do you avoid "I have seen this" overconfidence and still narrate clearly?

    Still verbalize assumptions and complexity; treat it like teaching; don't skip the proof sketch—interviewer may need to follow your logic.