Back

Array problem

Created 3 years ago
903 Views
2 Comments
PrasadPcP1UU
@PrasadPcP1UU
PrasadPcP1UU
@PrasadPcP1UUProfile is locked. Login

You are given with an array of numbers, Your task is to print the difference of indices of largest and smallest number.All number are unique.

Input Description:
First line contains a number ‘n’. Then next line contains n space separated numbers.

Output Description:
Print the difference of indices of largest and smallest array

Sample Input :
5
1 6 4 0 3
Sample Output :
-2
Comments (2)
Please login to comment.