Discuss / Java / 交作业

交作业

Topic source

康208970

#1 Created at ... [Delete] [Delete and Lock User]

static int findMissingNumber(int start,int end,List list) {
for (int j = start; j <= end; j++) {
boolean hint=false;
for (Object i:list) {
if (i.equals(j)) {
hint=true;
}
}
if(!hint){
return j;
}
}
return -1;
}


  • 1

Reply