Question d’entretien chez Amdocs

Find the first and second maximum of an array in one loop

Réponses aux questions d'entretien

Utilisateur anonyme

24 mai 2015

I gave them the code

8

Utilisateur anonyme

22 janv. 2017

int max=arr[0]; int smax=max; int flag=0; for(int i=0;imax){ flag=1; } if(flag==1) { smax=max; max=arr[i]; flag=0; } }