0
Max Number
I need to find Max no. Index without sorting . And if there are two same Numbers then i need to give smaller one's index I know from sorting
1 ответ
0
int max = arr[0];
for(i=1; i<n; ++i)
if(arr[i] > max)
max = arr[i];
I need to find Max no. Index without sorting . And if there are two same Numbers then i need to give smaller one's index I know from sorting