688 Knight Probability in Chessboard
1. Question
Input: 3, 2, 0, 0
Output: 0.0625
Explanation:
There are two moves (to (1,2), (2,1)) that will keep the knight on the board.
From each of those positions, there are also two moves that will keep the knight on the board.
The total probability the knight stays on the board is 0.0625.2. Implementation
3. Time & Space Complexity
Last updated