Challenge 1: Find the Maximum Value

Problem Statement #

Write a method named findMaxVal() to find the maximum integer value stored in an Array of any size.

Input #

the array passed as a parameter.

Output #

the maximum value found in the array as an integer

Sample Input & Output #

Input: {2, 9, 6, 17, 15}
Output: 17

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy