loading...

re: Daily Coding Problem #2 VIEW POST

FULL DISCUSSION
 
def total(arr)
  arr.reduce { |acc, x| acc * x }
end  

arr = [1, 2, 3, 4, 5]
arr.map { |x| total(arr) / x }
Code of Conduct Report abuse