Array
3882. Minimum XOR Path in a Grid
The line that decides this problem sits in the constraints: 0 <= grid[i][j] <= 1023. XOR never carries, so no path cost can grow past ten bits, and every value a path can produce lives in [0, 1024). That replaces the question "what is the cheapest cost here" with "which costs are reachable here", an
Loading…