Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Monday, Dec 7.Claim the deal

You are given a m * n board representing a position map and an array representing distances to the nearest blocker from a robot's position. The board is a 2D array where each cell can be:

  • 'O': Represents a robot.
  • 'E': Represents an empty space.
  • 'X': Represents a blocker.
Test Cases
Input
Output
Expected