Great solution.I did a little complex and extra work where I found the first and last occurence of 1 using binary search.Then I calculated total1s by last_occurence - first_occurence+1 and checked if it is greater than previous numbers .This would be of O(N logM) xDDD.
nice and easy approach
class Solution{
public:
int rowWithMax1s(vector arr, int n, int m) {
int ans=-1;
int sr=0,sc=m-1;
for(int i=0;i
Great solution.I did a little complex and extra work where I found the first and last occurence of 1 using binary search.Then I calculated total1s by last_occurence - first_occurence+1 and checked if it is greater than previous numbers .This would be of O(N logM) xDDD.
first tell me ye brute force wala approach all test cases pass kyu nhi kar rha hai. at least tle to dikhaye
are mera pass ho gaya . tu galti kar raha hoga
@@amanchoudhary4801 Bro you are late.
They removed the bug after me complaining to them.
@@ankitkumarmahato4318 ohh achaa. srry mujhe pata nhi tha
👌👌🙏🙏