Sir pls tell whats the error in code

it is not giving correct ans for valuer of k>=14

u need to keep track of the viisted row and column as well

added comments where updated made

okay… thank you ma’am…