Probability Of Knight In The Chessboard
1. You are given a N*N chessboard and the starting position of the knight in the chessboard. 2. The rows and columns are 0 indexed, so the top-left square is (0, 0), and the bottom-right square is (N-1, N-1). 3. You have to find the probability of knight to remain in the chessboard after exactly k number of moves. Note -> The knight continues moving until it has made exactly K moves or has moved off the chessboard.
1 <= N <= 25 0 <= K <= 100 0 <= r,c <= N-1
A number N A number K Two numbers r and c(starting row and column position of knight in the chessboard).
Check the sample output and question video.
3 2 0 0