Input: mat[][] = {{5, 0, 3, 1, 2}, {1, 8, 9, 1, 3}, {1, 2, 3, 4, 5}, {9, 1, 0, 3, 7}, {2, 3, 0, 6, 3}, {6, 4, 1, 7, 0}}
Output: 3
Explanation:
Choose two rows i = 0 and j = 4. Then, A[] = {5, 3, 3, 6, 3} and min(A[]) is 3, which is maximum possible.
Input: mat[][] = {{2, 13, 41, 5}, {91, 11, 10, 13}, {12, 3, 28, 6}}
Output: 13
Explanation:
Choose two rows i = 0 and j = 1. Then, A[] = {91, 13, 41, 13} and min(A[]) is 13, which is maximum possible.