I am getting one wrong test case for this sum

Please help me out rectify my code.

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 :slight_smile: