import java.util.Arrays; public class Solution { public boolean isContinuous(int [] numbers) { int index = -1; Arrays.sort(numbers); int zero = 0; int diff = 0; if(numbers.length==0)return false; for(int i=numbers.length-1;i>=0;i--){ if(numbers[i]==0){ zero = i+1; break; } if(i-1>=0&&numbers[i]==numbers[i-1]){ return false; } if(i-1>=0&&numbers[i-1]!=0){ diff += (numbers[i] - numbers[i-1] - 1); } } if(zero>=diff) return true; return false; } }