I like how you addressed the complement by generating a sequence of true and false. This was something new for me.
@TilakrajDixit5 күн бұрын
you can use XOR as well , for example string 1-> 0101 and string 2-> 1010 , then by using XOR of first element with all other in that row will create something like this , 1^1=0 , 1^0=1 , 1^1=0 and 1^0=1 , so string 2 is now 0101 which is now similar to string 1 . now just use the magic of hashmap and your code will run . HAPPY CODING
@vancedutube76204 күн бұрын
@TilakrajDixit Hey thanks for explaining this approach, but how did you come up that you want to xor first element with the all the other elements?
@anuragsekhri23155 күн бұрын
explained well bro
@goldenx24175 күн бұрын
Bhaiya please write code in cpp also
@motivationalshorts3935 күн бұрын
brother comment section me code provide kr diya kro jisse other language valo ko problem n ho smjhne me
@TilakrajDixit5 күн бұрын
class Solution { public: int maxEqualRowsAfterFlips(vector& mat) { unordered_mapmp; int row=mat.size(); int col=mat[0].size(); for(int i=0;i