Algorithm · Cisco · Easy
Requirements The first input line provides matrix_row and matrix_col, representing the matrix dimensions. The following matrix_row lines contain the matrix entries, with matrix_col values on each line. Output a value that is greatest in its row and least in its column. If there is no such value, output -1. The constraints are 1 <= N, M <= 1000. Every matrix entry is a non-negative integer. Examples Input: Output: Explanation: 2 at position (0,1) is the maximum value in its…
Checking your access…