<gouthampradhan>array_MaxConsecutiveOnes_1.java
public int findMaxConsecutiveOnes(int[] nums) {
    int max = 0;
    boolean flag = false;
    int count = 0;
    for (int i = 0; i < nums.length; i++) {
      if (nums[i] == 1) {
        if (!flag) {
          flag = true;
        }
        count++;
        max = Math.max(max, count);
      } else {
        count = 0;
        flag = false;
      }
    }
    return max;
  }
public int sample_funcname ( int [ ] var_0 ) {
  int max = 0 ;
  boolean var_8 = false ;
  int var_4 = 0 ;
  for ( int var_5 = 0 ;
  var_5 < var_0 . length ;
  var_5 ++ ) {
    if ( var_0 [ var_5 ] == 1 ) {
      if ( ! var_8 ) {
        var_8 = true ;
      }
      var_4 ++ ;
      max = Math . max ( max , var_4 ) ;
    }
    else {
      var_4 = 0 ;
      var_8 = false ;
    }
  }
  return max ;
}
