Problems > Saddle Points > Editorial

Saddle Points — Solution & Editorial

Back to the Problem

Precompute each row's minimum and each column's maximum, then test every cell against both.

Complexity: O(NM)