Search⌘ K
AI Features

Remove Element

Remove Element removes a chosen value from an integer array in place, allowing order to change. Return how many values remain, with all retained values at the array's beginning.

Statement

You are given an integer array, nums, and an integer, val. Your task is to remove all occurrences of val ...