Question: Time limit: 5000ms Memory limit: 256mb Description: Given a list L of unique integers. Find out the minimum value in the list L. -------------------------Copy the
Time limit: 5000ms Memory limit: 256mb Description: Given a list L of unique integers. Find out the minimum value in the list L. -------------------------Copy the following code, complete it and submit------------------------- #includeint min_in_array(int a[], int n) { // WRITE YOUR CODE HERE } // DO NOT MODIFY THE CODE BELOW int main() { int n, a[1000001], i, result; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d", &a[i]); result = min_in_array(a, n); printf("%d", result); return 0; } -------------------------------------------End of Code------------------------------------------- Input: First line contains a non-negative integer N; The second line contains L, a list of N integers, L_0, L_1, ..., L_(N-1); 0 <= N <= 10^6 Output: A integer Sample Input 1: 6 5 4 6 2 1 9 Sample Output 1: 1 Sample Input 2: 8 5 9 7 10 11 13 5 6 Sample Output 2: 5
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
