## Help authour, Buy PDF Ebook
>>>**Click Here**<<<

## Data Structure Questions and Answers-Maximum Sum Rectangle in a 2D Matrix

## Click on any option to know the CORRECT ANSWERS

Question 1 |

Given a 2D matri, x find a submatrix that has the maximum sum. Which of the following methods can be used to solve this problem?

Brute force | |

Recursion | |

Dynamic programming | |

All of the mentioned |

**NTA NET Questions answers**

Question 1 Explanation:

All of the mentioned methods can be used to solve the above problem.

Question 2 |

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

When all the elements are negative | |

When all the elements are positive | |

When some elements are positive and some negative | |

None of the mentioned |

**Civics Test Questions answers**

Question 2 Explanation:

When all the elements of a matrix are positive, the maximum sum rectangle is the 2D matrix itself.

Question 3 |

In which of the following cases, the maximum sum rectangle can be a 1 x 1 matrix containing the largest element?

When the matrix is a 1×1 matrix | |

When all the elements of a matrix are zero | |

When all the elements of the matrix are negative | |

All of the mentioned |

**Home science Questions answers**

Question 3 Explanation:

In all of the above cases, the maximum sum rectangle is a 1×1 matrix containing the largest element.

For the case, when all elements are zero, any submatrix can be chosen and 1×1 submatrix is a possible solution.

Question 4 |

Consider a matrix in which all the elements are non-zero(at least one positive and at least one negative element). In this case, the sum of the elements of the maximum sum rectangle cannot be zero.

True | |

False |

**History Questions answers**

Question 4 Explanation:

If a matrix contains all non-zero elements with at least one positive and at least on negative element, then the sum of elements of the maximum sum rectangle cannot be zero.

Question 5 |

Consider the 2×3 matrix {{1, 2, 3}, {1, 2, 3}}. What is the sum of elements of the maximum sum rectangle?

3 | |

6 | |

12 | |

18 |

**Computer science Questions answers**

Question 5 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.

There are 5 questions to complete.