Leetcode 2162. Minimum Cost to Set Cooking Time
Given start digit, moveCost, pushCost and targetSeconds, find the minimum fatigue to enter up to four digits (zero-padded to MMSS) whose minutes*60 + seconds = targetSeconds, where each digit press costs pushCost and moving the finger between different digits costs moveCost (starting at startAt). The problem reduces to checking all valid minute/second splits that sum to targetSeconds and computing the minimal move+push cost for their digit sequences.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late December, 2024
Mid-level
Microwave optimal keystroke input
Hello Interview Premium
Your account is free and you can post anonymously if you choose.