Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3596. Minimum Cost Path with Alternating Directions I
Given a grid with movement costs, find the minimum total cost to go from a start to a target cell while your moves must alternate between horizontal and vertical directions; treat the last move direction as part of state and use graph search / DP (BFS or Dijkstra) over (row, col, last-direction) to compute the optimal path.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.