DSA Key Problems

Remove Duplicates from Sorted Array

Given a nondecreasing integer array, keep one copy of each distinct value in place and return the retained count k. The first k positions must contain those values in sorted order.