You can trade off space to get this in linear time.
- Scan the list for the smallest and largest values, S and L.
- Use an array of booleans or a bitvector, A, large enough to hold (L - S + 1) entries.
- Go through the list again, setting the appropriate element of A to true when you see it.
- Now, A is sorted. Go through A and find the largest consecutive set of true values.
The first steps are linear in your list. The last is linear in the size of A, which could be large relative to your list if you have just a few values which are far apart. But, since you're dealing with ints, A is bounded.