LeetCode #136: Single Number

Photo by Marcel Eberle on Unsplash
//step1: count occurences of integers 
//step2: loop through integers
//step3: check to see if their value appears more than once
def singleNumber(self, nums: List[int])
result = Counter(nums)
def singleNumber(self, nums: List[int])
result = Counter(nums)
for i in result:
if result[i] == 1;
return i

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Melissa Guachun

Software Developer and visual artist based in NYC. Join me on my journey to coding enlightenment or a torrential mental breakdown, whichever comes first.