Available question text
Given an array and a value val, remove all occurrences of val in-place and return k such that the first k elements of the array contain all elements not equal to val (order may change). This must be done with O(1) extra space — commonly solved with a two-pointer overwrite/scan approach.
Related questions
Continue with questions that share topics or the same question type.
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
No company association
Leetcode 27. Remove Element
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source