Java, 100 98 79 bytes
a->{int n=a[0],m=n-1;for(int i:a)if(i==m+1)m=i;else n=i==n-1?i:-1;return n==0;} Formerly:
a->{int m,n;m=n=a[0];--m;for(int i:a)if(i==m+1)m=i;else if(i==n-1)n=i;else return 0>1;return 1>0;} Saved 3 bytes by replacing true and false with 1>0 and 0>1.
Saved 19 bytes with suggestions from Peter Taylor.
Ungolfed:
a -> { int n = a[0], m = n - 1; for (int i : a) if (i == m + 1) m = i; else n = i == n - 1? i : -1; return n == 0; } Keep track of the highest and lowest values seen so far as m and n; only accept a new value if it is m + 1 or n - 1 i.e. the next higher or lower value; initialize the high value, m, to one less than the first element so that it will "match" the first time around the loop. Note: this is a linear-time, online algorithm. It requires only three words of memory, for the current, highest-so-far, and lowest-so-far values, unlike a lot of the other solutions.
If the next value misses both the high and low ends of the range, the lowest-so-far value is set to -1 and then the low end can never proceed and reach zero. We then detect an antsy sequence by checking whether the low value, n, reached zero.
(Unfortunately this is less efficient because we always have to look at the entire sequence rather than bailing out after the first wrong number, but it's hard to argue with a 19-byte savings when other solutions are using O(n^2) and exponential time approaches.)
Usage:
import java.util.function.Predicate; public class Antsy { public static void main(String[] args) { int[] values = { 6, 5, 4, 7, 3, 8, 9, 2, 1, 0 }; System.out.println(test(values, a -> { int n = a[0], m = n - 1; for (int i : a) if (i == m + 1) m = i; else n = i == n - 1? i : -1; return n == 0; } )); } public static boolean test(int[] values, Predicate<int[]> pred) { return pred.test(values); } }