Limited Time Offer:Up to 20% off Hello Interview Premium
Up to 20% off Hello Interview Premium 🎉
Hello Interview
Your Dashboard
System Design
Code
Low Level Design
Behavioral
AI Coding
New
ML System Design
Salary Negotiation
Interview Guides
Blog
System Design
Low Level Design
AI Coding
Behavioral
New
Interview Questions
Success Stories
System Design
Low-Level Design
New
Ask The Community
Discord
Mock Interviews
1:1 Mentorship
Refer a Friend
Pricing
Sign in / Sign up
Search
⌘K
Pricing

Tutor

Tallest Tower by Stacking Blocks

Given a collection of block types each defined by a count, weight, and maximum supported weight, determine the maximum number of blocks that can be stacked into a tower where no block exceeds its supported weight limit from the total weight of all blocks above it including itself.

Asked at:

LinkedIn

LinkedIn


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Company
​
Level
All Regions
Region

Mid June, 2026

LinkedIn

LinkedIn

Staff

You're building the tallest possible tower from a collection of blocks. You have several block types; for each type you're given three integers: <number_of_blocks> <weight> <max_support_weight> - number_of_blocks — how many blocks of this type you have - weight — the weight of one such block - max_support_weight — the maximum weight this block can support above it, including its own weight Every block is 1 meter tall, so a taller tower simply means more blocks stacked. A block is valid in the tower only if the total weight resting on it (everything above it plus itself) does not exceed its max_support_weight. Return the height (number of blocks) of the tallest tower you can build. Example Input # <number_of_blocks> <weight> <max_support_weight> 1 2 2 // type A 6 3 24 // type B 40 5 200 // type C Output 43

Your account is free and you can post anonymously if you choose.

Hello Interview Premium

Recent interview questions
System Design Guided Practice
Exclusive content
Learn More
Questions
Meta SWE Interview QuestionsAmazon SWE Interview QuestionsGoogle SWE Interview QuestionsOpenAI SWE Interview QuestionsEngineering Manager (EM) Interview Questions
Learn
Learn System DesignLearn DSALearn BehavioralLearn ML System DesignLearn Low Level DesignGuided Practice
Links
FAQPricingGift PremiumHello Interview Premium
Legal
Terms and ConditionsPrivacy PolicySecurity
Contact
About UsProduct Support

7511 Greenwood Ave North Unit #4238 Seattle WA 98103


© 2026 Optick Labs Inc. All rights reserved.