Skip to main content

Mistake Clinic

Module-Specific Mistake Radar​

SymptomSeparating sequenceRepair
Lookup passes but rank failsRotate, replace, delete, then selectRecompute sizes independently of height
Local ordering passes an illegal tree10-left-5-right-12Carry subtree bounds
Repeated union enlarges a componentUnion a pair twiceCheck roots before merging sizes/count
Deleted graph edge still connectedInsert path then delete bridgeChange event model; ordinary DSU cannot split
Meld indexes past root slotsHigh-degree donor into small/empty receiverAllocate skipped slots and carry correctly
Reused donor changes receiverMeld then push into donorTransfer ownership and empty donor
Copy counts match only full sizesCheck append immediately after a power of twoProve every prefix, not selected n
Queue credits do not pay transferCount pop and push separatelyUse two transfer credits per element
Assigned zero disappearsAssign whole range zero, query subrangeDistinguish identity from assignment-zero
Lazy updates reverse timeAssign then add versus add then assignCompose new-after-old
Branch reads latest versionFork version 0 after version 1 existsUse the requested root and immutable nodes
Zero quantity appears absentStore key with value zeroTrack presence separately
Filter invents exact membershipOne-bit filter with an absent queryConfirm positives against exact data
Filter hides an old keyRebuild only from latest versionCover all queried retained versions
Expected bound presented as worst caseSupplied treap priorities form a chainState randomness model and guarantee type

Practice Mistake Checks​

For P1–P7 inspect ordering, metadata and event semantics. For P8–P14 inspect ownership, initial state, primitive units and sequence accounting. For P15–P20 inspect probability assumptions, algebraic order, historical isolation and representation cost. Save a real minimal failing sequence and a fresh successful recheck; do not fabricate mistakes to reach a quota.