Largest in a Slice
Easy · Slices
Keep a running maximum. The first item is a safe starting value. The slice is never empty.
Write Max(numbers) that returns the largest value in numbers.
Next: Keep the Evens
Easy · Slices
Keep a running maximum. The first item is a safe starting value. The slice is never empty.
Write Max(numbers) that returns the largest value in numbers.
Next: Keep the Evens