@@ -0,0 +1,500 @@
+// http://codingbat.com/prob/p167430%0A%0Apublic boolean has271(int%5B%5D nums) %7B%0A  for (int i = 0; i %3C (nums.length-2); ++i) %7B%0A    int value = nums%5Bi%5D;%0A    %0A    if (nums%5Bi+1%5D == (value+5) && nums%5Bi+2%5D == (value-1))%0A    %7B%0A      return true;%0A    %7D%0A    %0A    int correctValue = (value-1);%0A    boolean differsByTwoOrLess = %0A      !(nums%5Bi+2%5D %3E correctValue+2) && %0A      !(nums%5Bi+2%5D %3C correctValue-2);%0A    %0A    if (nums%5Bi+1%5D == (value+5) && differsByTwoOrLess) %7B%0A      return true;%0A    %7D%0A  %7D%0A  %0A  return false;%0A%7D%0A

Create has271.java