Best way to get the highest sum from a Matrix (using Java but algorithm is the issue here)
- by user294896
Sorry I dont know the correct terminology to use but I have a 3x3 matrix like this
1 3 4
5 4 5
2 2 5
and I want get the highest score by picking a value from each row/column but I cant pick the same row or column more than once , so the answer in this case is
3 + 5 + 5 = 13 (row0,col1 + row1,col0 + row2,col2)
4 + 5 + 5 = 14 is not allowed…