Count positions in Binary Matrix having equal count of set bits in corresponding row and column
Given a boolean matrix mat[][] of size M * N, the task is to print the count of indices from the matrix whose corresponding row and column contain an equal number of set bits. Examples: Input; mat[][] = {{0, 1}, {1, 1}}Output: 2Explanation:Position (0, 0) contains 1 set bit in corresponding row {(0, 0), (0, 1)} and column {(0, 0), (1, 0)}.Position