Search
⌘K
Get Premium
Leetcode 1936. Add Minimum Number of Rungs
Given a strictly increasing array of rung heights and a maximum climb distance dist from starting height 0, determine the minimum number of integer-height rungs to insert so every step between consecutive positions (including from 0) is at most dist. The core task is to examine each gap and add the fewest rungs needed to split any gap larger than dist into steps ≤ dist.
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.