1.

What is the time complexity of the brute force implementation of the maximum sum rectangle problem?(a) O(n)(b) O(n^2)(c) O(n^3)(d) O(n^4)This question was addressed to me in examination.Asked question is from Maximum Sum Rectangle in a 2D Matrix topic in division Dynamic Programming of Data Structures & Algorithms II

Answer»

Right choice is (d) O(n^4)

EASY explanation - The time complexity of the brute force IMPLEMENTATION of the maximum SUM RECTANGLE problem is O(n^4).



Discussion

No Comment Found

Related InterviewSolutions