Leetcode 3393. Count Paths With the Given XOR Value
Count the number of right/down paths from the top-left to bottom-right of an m×n grid whose XOR of visited cell values equals k (values and k are <16), returning the count modulo 1e9+7. The core challenge is to efficiently aggregate XOR states across exponentially many paths (often via DP or a meet‑in‑the‑middle on anti-diagonals) given m,n up to 300.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.