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.

Example:

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

To do this, we iterate through all the elements of the matrix and one by one compare them with the all the elements of the corresponding row and column.

Here is the implementation of the idea in C:

Output:

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