136-Single-Number

Sat 17 May 2025

https://leetcode.com/problems/single-number

import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
  def singleNumber(self, nums: List[int]) -> int:
    return functools.reduce(lambda x, y: x ^ y, nums, 0)
new Solution().singleNumber()

Score: 5

Category: leetcode