Fewest steps, breaking up to k walls
A maze is a non-empty list of equal-length strings where "." is open and "#" is a wall. You start at the top-left cell and want the bottom-right one, moving one step up, down, left or right. You may break through at most k walls on the way: stepping into a wall breaks it and uses up one of your k breaks. Return the fewest steps to reach the exit, or -1 if it can't be done.
The start and exit cells are always open, and k ≥ 0.
Besides the tests, one large input (a 12 × 12 maze) with a ~100 ms limit (scaled to your device's speed): brute force won't pass.
Examples
fewest_steps_breaking(["..#","#.#","..."], 1)→4fewest_steps_breaking([".#.","##.","##."], 0)→-1fewest_steps_breaking([".##","###","##."], 2)→-1