Vidyalelo
Data Structure · Q169

Dynamic Programming in Data Structures

Programming · Data Structure · question 169

Q169

What is the space complexity of the following dynamic programming implementation of the maximum sum rectangle problem? int max_sum_rectangle(int arr[][3],int row,int col) int left, right, tmp[row], mx_sm = INT_MIN, idx, val; for(left = 0; left mx_sm) mx_sm = val; return mx_sm;

A.
O(row*col)
B.
O(row)
Answer
C.
O(col)
D.
O(row*col*col)

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board