Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 575 Bytes

File metadata and controls

25 lines (21 loc) · 575 Bytes

Saddle Point

Easy


  1. You are given a square matrix of size 'n'. You are given n*n elements of the square matrix.
  2. You are required to find the saddle point of the given matrix and print the saddle point.
  3. The saddle point is defined as the least value in the row but the maximum value in the column of the matrix.

Example 1:

Input:  
n=4, 
arr = { 11 12 13 14 
        21 22 23 24 
        31 32 33 34 
        41 42 43 44  }
Output:  41

Constraints:

1 <= n <= 10^2
-10^9 <= e11, e12, .. n * m elements <= 10^9