3882. Minimum XOR Path in a Grid
You are given a 2D integer array
gridof sizem * n.You start at the top-left cell
(0, 0)and want to reach the bottom-right cell(m - 1, n - 1).At each step, you may move either right or down.
The cost of a path is defined as the bitwise XOR of all the values in the cells along that path, including the start and end cells.
Return the minimum possible XOR value among all valid paths from
(0, 0)to(m - 1, n - 1).
1 | class Solution { |