Spiral print of 2d array

in the video explanation i dint understand the condition
if(startrow>endrow)
and
if(endcol>startcol)
sir explained this towards the end of video.

hi @mkidwai74 in some special cases, like in the example bhaiya gave, middle elements can be printed twice that’s why to avoid it, we are using these conditions.