InterviewSolution
Saved Bookmarks
| 1. |
Consider the 2×3 matrix {{1,2,3},{1,2,3}}. What is the sum of elements of the maximum sum rectangle?(a) 3(b) 6(c) 12(d) 18I had been asked this question by my school principal while I was bunking the class.I'm obligated to ask this question of Maximum Sum Rectangle in a 2D Matrix in portion Dynamic Programming of Data Structures & Algorithms II |
|
Answer» RIGHT answer is (c) 12 Best explanation: Since all the ELEMENTS of the 2×3 matrix are positive, the MAXIMUM SUM rectangle is the matrix itself and the sum of elements is 12. |
|