int findMaxConsecutiveOnes(int* nums, int numsSize) {

int max = 0, sum = 0, i = 0;

```
if(numsSize == 1) return nums[0];
for(i = 0; i < numsSize; i++){
if(nums[i] == 0){
sum = 0;
}else{
sum++;
}
if(sum > max) max = sum;
}
return max;
```

}