Fix time complexity

This commit is contained in:
Jessica Kwok 2021-03-23 08:05:54 -07:00
parent f4761529d3
commit 7b6edea968

View file

@ -42,7 +42,7 @@ puts(single_number(nums))
#
# Approach 2: Use Ruby .count()
#
# Time Complexity: O(1)
# Time Complexity: O(n^2)
#
def single_number(nums)
nums.find do |num|