This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingMeasure how the input's shape changes the comparison count.
What this asks
See how the naive scan's cost changes with the input's shape.
Run it on disagreement-heavy, run-heavy and random inputs and count comparisons per character.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing