<awangdev>1004. Max Consecutive Ones III_1.java
public int longestOnes(int[] A, int k) {
        int left = 0, right = 0, n = A.length;
        while (right < n) {
            if (A[right++] == 0) k--;
            if (k < 0) {
                if (A[left] == 0) k++;
                left++;
            }
        }
        return right - left; 
    }
public int sample_funcname ( int [ ] var_0 , int var_1 ) {
  int var_3 = 0 , var_4 = 0 , var_6 = var_0 . length ;
  while ( var_4 < var_6 ) {
    if ( var_0 [ var_4 ++ ] == 0 ) var_1 -- ;
    if ( var_1 < 0 ) {
      if ( var_0 [ var_3 ] == 0 ) var_1 ++ ;
      var_3 ++ ;
    }
  }
  return var_4 - var_3 ;
}
