static int findMissingNumber(int start, int end, List<Integer> list) { int total = 0; int count = 0; for(Integer element:list) { count += element; total += (start++); } total += start; return total-count; }
Sign in to make a reply
不容艺