Challenge 2: Find the Second Minimum in an Array

This exercise requires you to find the second minimum in an array.

Problem Statement

Implement a function secondMinimum(int arr[], int size) which takes an array arr and its size and returns the second minimum in the given array.

Input:

An array of integers and its size.

Output:

Second minimum in the given array

Sample Input

arr[1,3,5,7,9], 5

Sample Input

3

Get hands-on with 1200+ tech skills courses.