SOLVE
LATER
N numbers were converted into their respective Binary form of M length and arranged in an NxM matrix.
Your task is to find the index of row (1 based indexing) which contains the binary number with maximum value. If multiple rows have maximum value then print the row with minimum index.
Input:
The first line contains two space separated integers N and M, denoting number of rows and number of columns in matrix respectively.
Each of the next N lines contains a number in binary form.
Output:
Print the index of row in a single line.
Constraints:
\(1 \le N,M \le 10^3\)
\(0 \le mat[i][j] \le 1\)
1st row value = 2^{3 }*1 + 2^{2 }*0 + 2^{1} *1 + 2^{0 }*0 = 10
2nd row value = 2^{3 }*0 + 2^{2 }*1 + 2^{1} *0 + 2^{0 }*0 = 4
3rd row value = 2^{3 }*0 + 2^{2 }*0 + 2^{1} *1 + 2^{0 }*0 = 2
4th row value = 2^{3 }*0 + 2^{2 }*0 + 2^{1} *1 + 2^{0 }*1 = 3
Challenge Name
Capillary Software Developer Hiring Challenge
Capillary Software Developer Hiring Challenge