Available question text
Given a sorted array, remove duplicates in-place so that each distinct value appears at most twice and return the new length k, preserving relative order and using O(1) extra space.
Related questions
Continue with questions that share topics or the same question type.
- Remove Duplicates from Sorted Array
Coding · Array · Two Pointers
- Remove Duplicates from Sorted List
Coding
- Remove Duplicates from Sorted List II
Coding
- Remove Duplicates From an Unsorted Linked List
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Amazon
Leetcode 80. Remove Duplicates from Sorted Array II
Reported Nov 20, 2024 · 1 source report
JUNIOR
Source snapshot: Nov 12, 2026
View source