ankitapuri / DSA-guide

Trying to cover important DSA
MIT License
49 stars 114 forks source link

Sum of Sub matrix for given Q queries #274

Open kiruba-r11 opened 3 years ago

kiruba-r11 commented 3 years ago

💥 Proposal

This #264 helps to find the sum of all sub matrices in the given matrix, and this concept is used to find the sum of sub matrix for any given bounds. In this problem, Q queries will be given which gives bounds of the sub matrix. We have to find its sum. Brute force takes O(Q * (N ^ 2)) complexity, but using the method 2 in #264, we can optimise it to a complexity of O(N ^ 2) space and time.

Have you read the Contributing Guidelines on Pull Requests ?

Yes

kiruba-r11 commented 3 years ago

@ankitapuri I would like to work in C++ under CrossWoC.

abhinav5481 commented 3 years ago

Hi @ankitapuri I would like to solve it in Python. Please assign it to me in Python