Drop unused .each

This commit is contained in:
Vitor Oliveira 2021-03-01 16:47:45 -08:00
parent f072feacff
commit 627ab8a265

View file

@ -148,7 +148,7 @@ def products(nums)
# so the product would be 1
product = 1
(nums.count - 1).downto(1).each do |i|
(nums.count - 1).downto(1) do |i|
num = nums[i]
# For the index 'i', product would contain the
# product of all elements to the right. We update product accordingly.