← switch

260. Single Number III

medium

Array · Bit Manipulation

read the problem on leetcode →

first solved 25 Mar 2024

python
class Solution:
    def singleNumber(self, nums: List[int]) -> List[int]:
        l=[]
        for i in nums:
            if nums.count(i)==1:
                l.append(i)
            if len(l)==2:
                break

        return l