Company: Rubrik_23nov
Difficulty: medium
Rubrik Towers body { font-family: sans-serif; line-height: 1.6; color: #333; } h1 { color: #2c3e50; } h2 { color: #34495e; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-top: 20px; } h3 { color: #555; } pre { background-color: #ecf0f1; padding: 10px; border-radius: 5px; overflow-x: auto; } code { font-family: 'Courier New', monospace; color: #c0392b; } ul, ol { margin-left: 20px; } li { margin-bottom: 5px; } p code { background-color: #f8f8f8; padding: 2px 4px; border-radius: 3px; } Rubrik Towers Problem Description A construction crew is putting up n towers, and your job is to help plan the work so it is as efficient as possible. You're given a list of integers, floors , where floors[i] represents the current number of floors in tower i . The crew has a combined budget of up to X extra floors to add across all towers together. Not all X floors need to be used. That said, no single tower is allowed to end up with more than Y floors. Your job is to decide how to distribute t