Discuss / Java / shuffle

shuffle

Topic source

lina19820525

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

static int findMissingNumber(int start, int end, List<Integer> list) {

List<Integer> li = new ArrayList<>();

for (int i = start; i <= end; i++) {

li.add(i);

}

for(Integer l:li) {

if(!list.contains(l)) {

        return l.intValue();

      }

}

return 0;

    }


  • 1

Reply