935-Knight-Dialer
Fri 14 November 2025
https://leetcode.com/problems/knight-dialer
import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
def knightDialer(self, n: int) -> int:
kMod = 1_000_000_007
dirs = [(-2, 1), (-1, 2), (1, 2), (2, 1),
(2, -1), (1, -2), (-1, -2), (-2, -1)]
# dp[i][j …Category: leetcode
Read More