We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
staticintmigratoryBirds(intn,int[]ar){// Complete this functionintary[]=newint[n];for(inti=0;i<n;i++)ary[ar[i]]++;intmax=0,maxpos=0;for(inti=0;i<n;i++){if(ary[i]>max){max=ary[i];maxpos=i;}}returnmaxpos;}
Migratory Birds
You are viewing a single comment's thread. Return to all comments →
My Java 8 Solution