You are viewing a single comment's thread. Return to all comments →
What is the problem with my solution?
static int migratoryBirds(int n, int[] ar) { int zero=0; int[] array=new int[5]; for(int i : ar){ array[i-1]++; } for(int i:array){ if(i==0) zero++; } return 5-zero; }
Seems like cookies are disabled on this browser, please enable them to open this website
Migratory Birds
You are viewing a single comment's thread. Return to all comments →
What is the problem with my solution?