Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 27. Remove Element
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.