Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 848661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:58:46+00:00 2026-05-15T06:58:46+00:00

I have the following problem Assume that we have a 9*8 matrix A matrix

  • 0

I have the following problem

Assume that we have a 9*8 matrix

A matrix is said to have a “saddle point”, if in some position
is the smallest value in its row and the largest value in its column .
In symbols , a[i][j] is a saddle point if

 a[i][j]=min a[i][k]  ==max a[k][k]
             1<=k<=8      1<=k<=9

Please help me finding the computer location of the saddle point.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:58:46+00:00Added an answer on May 15, 2026 at 6:58 am

    Given MxN matrix, this is O(MN), which is optimal.

    INIT rowMin = [ +Infinify ] xM
    INIT colMax = [ -Infinity ] xN
    
    FOR r = 1..M
      FOR c = 1..N
        rowMin[r] = MIN(rowMin[r], mat[r][c])
        colMax[c] = MAX(colMax[c], mat[r][c])
    
    FOR r = 1..M
      FOR c = 1..N
        IF mat[r][c] == rowMin[r] == colMax[c]
           DECLARE saddlePoint(r, c)
    

    Why is this optimal?

    Because there are MxN values, and they each need to be looked at, so for your answer to be certain (i.e. not probabilistic), the lowerbound is O(MN).

    Can this be optimized further?

    You can optimize this a bit. It’ll still be O(MN), but instead of finding the maximum/minimum values, you find their indices instead. This can make the second phase O(M) in the best case (i.e. when there’s a unique min/max in a row/column).

    Note that in the worst case, there are O(MN) saddle points: that’s when the numbers in the array are all equal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When writing GUIs, I've frequently come over the following problem: Assume you have a
I have a question regarding string modification. Let's assume that we have the following
Let's assume that we have following jQuery plugins (each of them in separate files):
I have the following problem in R: Lets assume the following data frame: a
I have the following question on java keystores and keytool. I assume that a
Let's assume that we have simple jQuery code like the following: var $document =
Assume the following problem context: 1) In our application, we have a business object
Let's assume that I have two tables... Foo and Bar. They contain the following
I have following problem: I have built a tabbar application with 4 tabs. I
I have following problem, Code: String a=Yeahh, I have no a idea what's happening

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.