728x90
class Solution:
def removeDuplicates(self, nums: List[int]) -> int:
nums[:] = list(set(nums))
nums.sort()
return len(nums)
stackoverflow.com/questions/4081561/what-is-the-difference-between-list-and-list-in-python
list[:] -> shallow-copies the list
비추가 6695에 달하는 문제
728x90
댓글