Problem: Write a Program in C to find an element that is the minimum in the row but maximum in the column in the given matrix.


To solve this problem, we have to check each element in the given matrix, whether it is the minimum element in its row and the maximum in its column.

For this, we select each element individually from the matrix compare it with all the elements of the same row and column.

Here is the implementation of the idea in C:


Enter the size of Matrix NxN:
Enter 9 Numbers into matrix:
1 2 3
4 5 6
7 8 9

Found an element: 7

In this tutorial, we learned to find the elements in a matrix which is minimum in the row but maximum in the column.

Leave a Reply

4 − 1 =