Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
FInd rows with maximum no of 1's
int rowWithMax1s(vector<vector<int> > arr, int n, int m) { // code here int res=INT_MIN; int r=-1;int f=0; for(int i=0;i<=n-1;i++) { int s=0; while(s<=m-1) { if(arr[i][s]==1) { f++; break; } s++; } if(res<((m-1)-s+1) && f!=0) { r=i; res=m-1-s+1; } } return (f!=0)?r:-1; }
run
|
edit
|
history
|
help
0
Constructor.cpp
FindMissingNewt
ExceptExpo
rotation
sheetal
ClassQuiz2
Boost adapters foreach
all possible palindrome partitions
Shortest Non Common Subsequence
Luces led con relé