#Java 7, 157 153 150 125 117 bytes
Java 7, 157 153 150 125 117 bytes
int c(char[]z){for(int i=2,a,b,c;i<z.length;i++)if(((a=z[i-1])<(c=z[i])&(b=z[i-2])<a)|(a>=c&b>=a))return 0;return 1;}
Ungolfed & test cases:
class M{
static int c(char[] z){
for(int i = 2, a, b, c; i < z.length; i++){
if(((a = z[i-1]) < (c = z[i]) & (b = z[i-2]) < a) | (a >= c & b >= a)){
return 0; //false
}
}
return 1; //true
}
public static void main(String[] a){
System.out.print(c("ABA".toCharArray()) + ", ");
System.out.print(c("ABB".toCharArray()) + ", ");
System.out.print(c("BAB".toCharArray()) + ", ");
System.out.print(c("BUMP".toCharArray()) + ", ");
System.out.print(c("BALD".toCharArray()) + ", ");
System.out.print(c("BALDY".toCharArray()) + ", ");
System.out.print(c("UPWARD".toCharArray()) + ", ");
System.out.print(c("EXAMINATION".toCharArray()) + ", ");
System.out.print(c("AZBYCXDWEVFUGTHSIRJQKPLOMN".toCharArray()) + ", ");
System.out.print(c("AAA".toCharArray()) + ", ");
System.out.print(c("ACE".toCharArray()) + ", ");
System.out.print(c("THE".toCharArray()) + ", ");
System.out.print(c("BUMPY".toCharArray()) + ", ");
System.out.print(c("BALDING".toCharArray()) + ", ");
System.out.print(c("ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray()) + ", ");
}
}
Output:
1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0