206. Index Difference of Min and Max
Problem Statement:
Given a number N and array of N integers, print the difference between the indices of smallest and largest number(if there are multiple occurances, consider the first occurance).
Input Description:
Input Size : |N| <= 1000000
Sample Input:
5
3 5 4 4 7
Sample Output:
4
Code Editor
40