Algorithm · Roblox · Medium
You are given a rectangular board represented as a list of strings grid. Every character in grid describes a single tile on the board and is one of three kinds: 'W' — a walk tile. Standing here lets the player move 1 step to any of the four orthogonally adjacent tiles (up, down, left, right). 'J' — a jump tile. Standing here lets the player move exactly 2 tiles in any of the four orthogonal directions, skipping over whatever sits in the tile immediately between the start and…