<qiyuangong>485_Max_Consecutive_Ones_1.java
public int findMaxConsecutiveOnes(int[] nums) {
        int ans = 0;
        int curr = 0;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] == 1) {
                curr++;
                if (curr > ans) ans = curr;
            } else {
                curr = 0;
            }
        }
        return ans;
    }
public int sample_funcname ( int [ ] var_0 ) {
  int var_2 = 0 ;
  int var_3 = 0 ;
  for ( int var_4 = 0 ;
  var_4 < var_0 . length ;
  var_4 ++ ) {
    if ( var_0 [ var_4 ] == 1 ) {
      var_3 ++ ;
      if ( var_3 > var_2 ) var_2 = var_3 ;
    }
    else {
      var_3 = 0 ;
    }
  }
  return var_2 ;
}
