{"id":"remove-element-write-never-exceeds-read","text":"In `removeElement`, the write pointer `k` satisfies `k <= i` at all times, so the copy `nums[k] = nums[i]` never overwrites an unread element — this is the safety invariant that makes in-place compaction correct.","truth_value":"IN","source":"entries/2026/06/06/remove-element-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"remove-element-write-never-exceeds-read","truth_value":"IN","reason":"premise"}]}}