Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1840. Maximum Building Height
Given n buildings in a line with height1 = 0, nonnegative integer heights, adjacent height differences ≤ 1, and some positions having upper bounds, compute the maximum possible building height. Because n can be huge but restrictions are sparse, the problem reduces to propagating slope constraints between restricted points and computing the highest feasible peak between neighboring restrictions.
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.