How to Remove all occurrence of certain number ?
[Question]: Given an integer array nums and an integer k, remove all occurrences of k in nums in-place. The order of the elements may be changed. Then return the count after removal Approach: We can declare a variable which holds index initial it’s 0 now move elements which are not matched with k
How to Remove all occurrence of certain number ? Read More »