Plain English Definition
A rule that must remain true while the solution runs.
Preview Example
In a sliding window, the invariant might be that the current window contains no duplicate characters.
Master DSA
Unlock proof and code translations.
Master DSA includes full applied examples, common mistakes, proof translations, code-level usage, and advanced decision checklists.
Next Step
Understand the Term. Now Apply It.
Now that you understand this term, see how it appears inside real reasoning walkthroughs.