MCPcopy Create free account
hub / github.com/HuberTRoy/leetCode / singleNumber

Method singleNumber

Array/SingleNumber.py:33–42  ·  view source on GitHub ↗

:type nums: List[int] :rtype: int

(self, nums)

Source from the content-addressed store, hash-verified

31
32class Solution(object):
33 def singleNumber(self, nums):
34 """
35 :type nums: List[int]
36 :rtype: int
37 """
38
39 for i in range(1, len(nums)):
40 nums[i] = nums[i] ^ nums[i-1]
41
42 return nums[-1]
43

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected