Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ main
Function
main
CPP/arrays/Max_Consecutive_Ones.cpp:18–23 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
16
}
17
18
int main(){
19
bool a[]={1,1,1,0,1,1,1,0,1,0,1,0,1,1};
20
int n=sizeof(a)/sizeof(a[0]);
21
cout<<maxones(a,n); // return 3 as max consecutive ones in the array
22
return 0;
23
}
Callers
nothing calls this directly
Calls
1
maxones
Function · 0.85
Tested by
no test coverage detected