```
int findMaxConsecutiveOnes(vector<int> &nums, int start = 0) {
auto it = find(nums.begin() + start, nums.end(), 0);
int ones = it - nums.begin() - start;
if (it == nums.end()) return ones;
else {
return max(ones, findMaxConsecutiveOnes(nums, (it - nums.begin() + 1)));
}
}```
```