Minimum Cost Path With At Most K Turns
Run a cheapest-first search whose states also remember the direction and how many turns were spent; the first time the corner is popped gives the answer.
Run a cheapest-first search whose states also remember the direction and how many turns were spent; the first time the corner is popped gives the answer.