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 Rubrik is constructing n towers, and your goal is to help them maximize their construction efficiency. You're given a list of integers, floors , where floors[i] represents the current number of floors in tower i . You have a budget to add a total of up to X floors across all towers combined. It is not necessary to always add all X floors. However, no single tower can exceed Y floors. Your task is to strategically add these X floors to the towers to maximize the