Challenge: Find Minimum Value in Array

Given an array of size "n", can you find the minimum value in the array? Implement your solution in Java and see if your output matches the expected output.

Problem Statement #

In this problem, you have to implement the int findMinimum(int[] arr) method, which will traverse the whole array and find the smallest number in the array.

Method Prototype #

int findMinimum(int[] arr)

Output #

The smallest number in the array.

Sample Input #

arr = {9, 2, 3, 6}

Sample Output #

2

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.