Remove Element
Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. Return the number of elements in nums which are not equal to val.
Remove Element

Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. Return the number of elements in nums which are not equal to val.

Example 1:
Input: {"nums":[3,2,2,3],"val":3}
Output: 2
Input
arr ={"nums":[3,2,2,3],"val":3}

Remove all 3

Remove value: 3

ki30212233
k (write): 0
i (read): 0
Kept: 0
Variables
VariableValue
val3
DepthFunction Call
Stack empty
0/5