C++ Solution | Memoization
\ndouble dp[26][26][101];\n    int dx[8] = { 2, 1, -1, -2, -2, -1, 1, 2 };\n    int dy[8] = { 1, 2, 2, 1, -1, -2, -2, -1 };\n\n    double solve(int i, int j, in
```\ndouble dp[26][26][101];\n    int dx[8] = { 2, 1, -1, -2, -2, -1, 1, 2 };\n    int dy[8] = { 1, 2, 2, 1, -1, -2, -2, -1 };\n\n    double solve(int i, int j, int n, int k) {\n        // out of boundary\n        if(i < 0 || i >= n || j < 0 || j >= n) return 0;\n        \n        if(k == 0) return 1;\n        \n        if(dp[i][j][k]) return dp[i][j][k];\n        \n        double sum = 0;\n        \n        for(int x=0;x<8;x++) {\n            sum += solve(i+dx[x], j+dy[x], n, k-1);\n        }\n        \n        return dp[i][j][k] = sum/8;\n    }\n    \n    double knightProbability(int n, int k, int row, int column) {\n        return solve(row, column, n, k);\n    }\n```
['Dynamic Programming', 'Recursion', 'Memoization', 'C']