Pregunta de entrevista de Amdocs

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

Respuestas de entrevistas

Anónimo

24 may 2015

I gave them the code

8

Anónimo

22 ene 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; } }