Funky chess board (backtracking)

unable to understand sample input and output. Kindly help simplify problem statement.

Tanay u have to visit each of the square in the modified chess board those position which u can visit u have to tell the minimum of that

Hey Tanay,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.