Search⌘ K
AI Features

Shortest Path in a Grid with Obstacles Elimination

Shortest Path in a Grid with Obstacles Elimination asks for the fewest steps from the top-left to bottom-right, removing at most k obstacles when needed, or -1 if unreachable.

Statement

Given an m x n integer matrix grid, where each cell contains either ...