Please help me out rectify my code.
I am getting one wrong test case for this sum
if(endCol > startCol){
Here it should be endcol>=startcol
if(endRow > startCol){
Here it should be endrow>=start row
if this solves your doubt please mark it as resolved 