[LeetCode] 27. Remove Element
Python
class Solution:
def removeElement(self, nums: List[int], val: int) -> int:
while nums.count(val):
nums.remove(val)
return len(nums)
class Solution:
def removeElement(self, nums: List[int], val: int) -> int:
while nums.count(val):
nums.remove(val)
return len(nums)
댓글남기기