{"id":"remove-dupes-compare-against-write-head","text":"Uniqueness is checked via `nums[i] != nums[k-1]` (last written value), not `nums[i] != nums[i-1]` (previous read position) — both work on sorted input but the write-head form generalizes to the Remove Duplicates II variant.","truth_value":"IN","source":"entries/2026/06/06/remove-duplicates-from-sorted-array-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"remove-dupes-compare-against-write-head","truth_value":"IN","reason":"premise"}]}}