136. Single Number
·
Algorithm
Single Number - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. 집합 사용 class Solution: def singleNumber(self, nums: List[int]) -> int: set1 = set() for num in nums: if num not in set1: set1.add(num) else: set1.remove(num) return set1[0] 2. 조건의 특성 사용, 2*(a+b+c) - (2a+2b+c) = c cla..