Given a sorted array, remove duplicates in-place so each unique value appears once, then return the count k. Two approaches, same problem — switch between them and watch how time and space trade off.
k