← Questions

Remove duplicates from a sorted array in place

0
MetaCodingLast asked Apr 2026

Remove duplicates from a sorted array in place so each value appears once, and return the new length; the first part of the array must hold the unique values in order. Use O(1) extra space.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding