LeetCode
Remove Element
Click
here
for an explanation.