Optimised approach issue

what is the most optimised approach to find the row or column with the largest sum?

for the max row sum u can do it when u r taking input as u take u take the input of the whole row at once so make a cursum which store the sum of current row and maxsum which have the maximum sum of row

for the col sum u can maintain an array and then find

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.