1.

Given a 2D matrix, find a submatrix that has the maximum sum. Which of the following methods can be used to solve this problem?(a) Brute force(b) Recursion(c) Dynamic programming(d) Brute force, Recursion, Dynamic programmingThis question was addressed to me by my school teacher while I was bunking the class.Question is from Maximum Sum Rectangle in a 2D Matrix topic in section Dynamic Programming of Data Structures & Algorithms II

Answer»

Right choice is (d) BRUTE force, RECURSION, Dynamic programming

The EXPLANATION is: Brute force, Recursion and Dynamic programming can be used to find the submatrix that has the maximum sum.



Discussion

No Comment Found

Related InterviewSolutions