<awangdev>485. Max Consecutive Ones_1.java
public int findMaxConsecutiveOnes(int[] nums) {
        if (nums == null || nums.length == 0) {
            return 0;
        }
        int maxCount = 0;
        int count = 0;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] == 0) {
                maxCount = Math.max(count, maxCount);
                count = 0;
            } else {
                count++;
            }
        }
        return Math.max(count, maxCount);
    }
public int sample_funcname ( int [ ] var_0 ) {
  if ( var_0 == null || var_0 . length == 0 ) {
    return 0 ;
  }
  int var_4 = 0 ;
  int var_5 = 0 ;
  for ( int var_6 = 0 ;
  var_6 < var_0 . length ;
  var_6 ++ ) {
    if ( var_0 [ var_6 ] == 0 ) {
      var_4 = Math . max ( var_5 , var_4 ) ;
      var_5 = 0 ;
    }
    else {
      var_5 ++ ;
    }
  }
  return Math . max ( var_5 , var_4 ) ;
}
