看了大家的写法,感觉我这么写太low了
static int findMissingNumber(int start, int end, List<Integer> list) { Integer num = 0; for(Integer n=start; n<=end; n++) { Boolean f = false; for(Integer m : list) { if(n.equals(m)) { f = true; } } if(f.equals(false)) { num = n; break; } } return num; }
Sign in to make a reply
大侠灬请留步
看了大家的写法,感觉我这么写太low了