McqMate

Q. |
## In which of the following cases, the maximum sum rectangle is the 2D matrix itself? |

A. | when all the elements are negative |

B. | when all the elements are positive |

C. | when some elements are positive and some negative |

D. | when diagonal elements are positive and rest are negative |

Answer» A. when all the elements are negative | |

Explanation: when all the elements of a matrix are positive, the maximum sum rectangle is the 2d matrix itself. |

2.6k

0

Do you find this helpful?

17

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- Consider the 2×3 matrix {{1,2,3},{1,2,3}}. What is the sum of elements of the maximum sum rectangle?
- Consider the 2×2 matrix {{-1,-2},{-3,-4}}. What is the sum of elements of the maximum sum rectangle?
- The dynamic programming implementation of the maximum sum rectangle problem uses which of the following algorithm?
- Matrix A is of order 3*4 and Matrix B is of order 4*5. How many elements will be there in a matrix A*B multiplied recursively.
- If Matrix X is of order A*B and Matrix Y is of order C*D, and B=C then the order of the Matrix X*Y is A*D?
- Given a 2D matrix, find a submatrix that has the maximum sum. Which of the following methods can be used to solve this problem?
- In which of the following cases, it is not possible to have two subsets with equal sum?
- You are given infinite coins of denominations v1, v2, v3,…..,vn and a sum S. The coin change problem is to find the minimum number of coins required to get the sum S. This problem can be solved using
- You are given infinite coins of N denominations v1, v2, v3,…..,vn and a sum S. The coin change problem is to find the minimum number of coins required to get the sum S. What is the time complexity of a dynamic programming implementation used to solve the coin change problem?
- What is the worst case time complexity of dynamic programming solution of set partition problem(sum=sum of set elements)?