Maximum

Difficulty:
Elementary

Tags:
numbers

Instructions:
Find the max in a given set of numbers

Code:
def maximum(arr)
  ___
end

assert_equal maximum([2, 42, 22, 02]), 42
assert_equal maximum([-2, 0, 33, 304, 2, -2]), 304
assert_equal maximum([1]), 1

Your Solution


Back to Problems