본문 바로가기
python-algorithm

leetcode 448. Find All Numbers Disappeared in an Array

by 무적김두칠 2022. 3. 28.

1
2
3
4
class Solution:
    def findDisappearedNumbers(self, nums: List[int]) -> List[int]:
        n=len(nums)
        return set(range(1,n+1))-set(nums)
cs
반응형

'python-algorithm' 카테고리의 다른 글

leetcode 896. Monotonic Array  (0) 2022.03.28
leetcode 1185. Day of the Week  (0) 2022.03.28
Leetcode 268. Missing Number  (0) 2022.03.28
leetcode 2129. Capitalize the Title  (0) 2022.03.25
leetcode 217. Contains Duplicate  (0) 2022.03.24

댓글