Azienda coinvolta
Write a function whose parameters are an array of integers, and its length. Return the difference between the maximum and minimum element.
Anonimo
Typing (in C) on their notebook app on their laptop.
int findDifference(int a[], int n) { int min = INT_MAX; int max = INT_MIN; for (int i = 0 ; i max) max = a[i]; } return (max-min); }
Non lasciarti sfuggire opportunità e informazioni privilegiate seguendo le aziende dove vorresti lavorare.
Ricevi suggerimenti e aggiornamenti personalizzati avviando le tue ricerche.