Leetcode 26. Remove Duplicates from Sorted Array
Given a sorted array, remove duplicates in-place so each unique value appears only once (preserving order) and return the count k of unique elements. This is typically solved by a two-pointer scan that overwrites duplicates without using extra space.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late May, 2026
Meta
Senior
Early October, 2025
Meta
Mid-level
Early September, 2025
Meta
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.