...

/

Challenge 1: Find the Maximum Value

Challenge 1: Find the Maximum Value

Learn how to find the maximum value in an array in this challenge.

We'll cover the following...

Problem statement

Write a method named Find_Maximum() to find the maximum integer value stored in an array.

Input

The array passed as a parameter.

Output

The maximum value found in the array.

Sample Input & Output

Input: {15, 6, 3, 21, 19, 4}
Output: 21

Coding challenge

Think over the problem carefully and write your code below. It’s recommended that you try solving the problem by yourself before referring to the solution part.
Good luck!

Perl
#Returns maximum value from Array passed as parameter
sub Find_Maximum {
#write your code here
return -1; #change this line to return the maximum value
}