mirror of
https://github.com/TheAlgorithms/Ruby
synced 2024-12-27 21:58:57 +01:00
Fix time complexity
This commit is contained in:
parent
f4761529d3
commit
7b6edea968
1 changed files with 1 additions and 1 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue