Challenge 2: Find Maximum in a List
In this challenge, find the maximum number in a List.
Problem Statement 1
Create a findMaximum
function that receives a list
as a parameter and returns the maximum value in the list. As you iterate over the list, you may want to keep track of the current maximum value in order to keep comparing it with the next elements of the list.
Input
A list
Output
Maximum number in the list
Sample Input
[1, 4, 9, 10, 23]
Sample Output
max = 23
Get hands-on with 1400+ tech skills courses.