Spiral print 2d array

at 21:21 minute i havent understood why sir has put the condition

hi @bakshianjali49 do a dry run for matrix of size 3*4 or 4*3 you’ll see some nos printed together