Doubt in gold grid problem

Sir/Mam why there we can make “N^2” cuts and how for addition there is"N^2" time.

Hi @Royal_Yashasvi
in this problem, u need to find max of (min gold coin we can obtain if we divide the grid into 4 parts).
so we can consider every case in n^2 ways that is consider every point in the grid as intersection of lines we made .
for calculating the no. of gold in each part, we can precompute sum as explained in video in n^2 time and then later use this grid to find number of gold in each query in O(1) time.
If something is still unclear, feel free to post ur doubt here.
Hope dis helps.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.