I’m trying to see if any series of data, beginning at array position 0, is contiguous in the sense that array[0] has a numerical value of 0, array[1] has a numerical value of 1, and so on. For example:
private void isContiguous(int[] array, int position){
for(int i = 1; i < array.length; i ++){
if(!array[i].equals(null)){
long previous = this.extract_long(array[i - 1], OFFSET);
long current = this.extract_long(array[i], OFFSET);
if((previousOffset/PACKET_LENGTH) < ){
}
}
}
}
is about as far as I can think of for a general solution. This is kinda bending my mind so it’d be nice to have some help 🙂
Something to start with:
(I don’t know why you need position, OFFSET, and so on, but the above code should fulfill the written requirement)