#3256
Maximum Value Sum by Placing Three Rooks I
grandmaster · 2265 · lc hard +32 · 16.4% accepted · 109 likes · top 1%
Description
You are given m x n integer matrix board representing a chessboard. Place exactly 3 rooks so that no two share a row or column. Return the maximum possible sum of the three chosen cell values.
Code
1
2
3