Skip to content

Commit ae32cc6

Browse files
Update 136. Single Number.py
added function comment
1 parent 0f66b21 commit ae32cc6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/easy/136. Single Number.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
class Solution:
22
def singleNumber(self, nums: List[int]) -> int:
3+
"""
4+
singleNumber takes nums List[int] and finds the singular element that is not duplicated and returns it
5+
nums List[int] (each element appears twice except for 1)
6+
(1 <= nums.length <= 3 * 104)
7+
(-3 * 104 <= nums[i] <= 3 * 104)
8+
"""
39
ts_set = set()
410
for i in nums:
511
if i in ts_set:

0 commit comments

Comments
 (0)