Basic Framework
AssessInvariantstheoryresearch-cardWhy BASIC Works

Theory Card 052 — Invariants / Assess

Invariants — BASIC step map

Research lens

An invariant is a condition that remains true throughout an algorithm or system process and anchors correct reasoning. In the Assess stage of BASIC, the goal is to evaluate candidate directions and constraints. That makes this concept especially relevant here, because it shapes how much mental work the candidate is trying to carry at once and what gets made explicit.

What you make visible is what gets credit.

Why it matters in SWE interviews

They are crucial in binary search, sliding windows, heaps, queues, and distributed workflows alike. Structure is where invariants become explicit, which makes implementation safer and explanation clearer. In practice, Assess is where the candidate should ask: What approaches are available, what trade-offs matter, and what complexity target is realistic? That question acts like a cognitive boundary. It protects the answer from turning into an unstructured search.

BASIC move

A strong move here is to compare plausible approaches before committing. For Invariants, that means deliberately naming the important units instead of juggling them implicitly. The interviewer sees cleaner reasoning, and the candidate benefits from turns guessing into reasoned choice.

Common miss

The miss is coding pointer moves or state transitions without naming what must remain true after each step. When that happens, the candidate usually feels busy, but the answer is actually becoming less inspectable.

Practice prompt

“While practicing, pause at the Assess step and explain how Invariants changes the way you would handle the prompt.”

The real skill here
Assessment is comparison, not selection. Strong candidates explore at least two paths before committing. They don't just say 'I'll use a hash map' — they explain why the alternative (sorting, brute force, different data structure) is worse for this specific problem. That comparison is the signal.

References

S10 S12 S13

Related in Why BASIC Works

January 7, 2023

Why BASIC works for software engineers

BASIC — Breakdown, Assess, Structure, Implement, Check — works for software engineers because it is not just a catchy mnemonic. It is a compact operating system for thinking under…

January 19, 2023

Theory Card 006 — Cognitive Load / Breakdown

Cognitive load theory argues that solving unfamiliar problems can consume the same limited mental resources needed to learn and reason clearly. In the Breakdown stage of BASIC,…

January 21, 2023

Theory Card 007 — Cognitive Load / Assess

Cognitive load theory argues that solving unfamiliar problems can consume the same limited mental resources needed to learn and reason clearly. In the Assess stage of BASIC, the…