Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2087. Minimum Cost Homecoming of a Robot in a Grid
Compute the minimum cost to move a robot from start to home on an m×n grid where entering row r costs rowCosts[r] and entering column c costs colCosts[c]. Because costs are nonnegative, an optimal path is monotonic, so the answer is the sum of rowCosts for rows between startRow and homeRow (excluding the start) plus the sum of colCosts for columns between startCol and homeCol (excluding the start).
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.