LeetCode2 min read

27. Remove Element | LeetCode Solution | JavaScript | Easy

Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The order of the elements may be changed. Then return the number of elements in nums which are not equal to val.

P

Pranay Kothapalli

July 14, 2024

#leetcode#algorithms#javascript#arrays#easy
PK

Pranay Kothapalli

Senior Frontend Developer specializing in UI components and design systems. With over 12 years of experience, I contribute to open-source projects and write about React, TypeScript, and modern web development.

Maintainer at Rad UIFullstack Engineer at Sprinto

Enjoyed this article?

Explore more interactive algorithm visualizations and computer science concepts to continue your learning journey.