not passing any test case
Knight moves______
there will be 8 moves for the knight to move from any position.
also I didn’t really understand the need of custom class and your algorithm in general, I have corrected it. please check.
@abhinandankainth1999 i am running the loop 8 times
and im using custom object to store row , col , depth
i think i have written the code correct but pls have a look again
you keep on adding in row, and col, you have to take fresh variables and then do rol + x[i] and col + y[j]
1 Like