Update appNew update is available. Click here to update.
About
Institute of Engineering & Technology,Bundelkhand University 2023
My Stats
EXP gained
yellow-spark
1449
Level
5 (Champion)
Community stats
Discussions
0
Upvotes
0
Know more
40
Total problems solved
22
Easy
13
Moderate
5
Hard
0
Ninja
Jan Jan Feb Feb Mar Mar Apr Apr May May Jun Jun Jul Jul Aug Aug Sep Sep Oct Oct Nov Nov Dec Dec

Current streak:

1 day

Longest streak:

2 days

Less

More

Discussions
best and the easy answer
Interview problems

int flipBits(int A, int B){

    // Write your code here.

     int ans = 0,count = 0;

       ans =  (A^B);

    

     while(ans!=0)

     {

         if(ans&1==1)

         count++;

         ans >>=1;

     }

    

    return count;

}

profile
Shivani Gupta
Published On 24-Jul-2023
125 views
0 replies
1 upvotes
brute force solution c++
Interview problems

int rowWithMax1s(vector<vector<int>> &matrix, int n, int m)

{

    //    Write your code here.

    int ans = 0, res = -1;

    for(int i =0;i<n;i++)

    { int row = 0;

        for(int j =0;j<m;j++)

        {

            if(matrix[i][j]==1)

             row ++; 

        }

        if(row>ans) res = i;      

        ans = max(ans, row);

    }

    return res;

}

profile
Shivani Gupta
Published On 23-Jul-2023
154 views
0 replies
0 upvotes