mirror of
https://github.com/20kaushik02/leetcode-gulag.git
synced 2026-01-25 07:34:05 +00:00
let's try this again shall we
problems 1->10 of LC150
This commit is contained in:
7
27-remove-element/soln.py
Normal file
7
27-remove-element/soln.py
Normal file
@@ -0,0 +1,7 @@
|
||||
def removeElement(self, nums: list[int], val: int) -> int:
|
||||
i = 0
|
||||
for x in nums:
|
||||
if x != val:
|
||||
nums[i] = x
|
||||
i += 1
|
||||
return i
|
||||
Reference in New Issue
Block a user