This is a verified interview question from Natwest. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Maximum Profit Natwest - IIT Roorkee" covers key patterns like Other.
"**Mode:** On-Campus **Exam Pattern:** 2 DSA **OA Date:** 2026-11-03 ## Maximum Profit Cargo Drone: Maximum Profit A courier company is loading a cargo drone with sealed crates. Over one delivery run, each crate loaded earns a fixed profit. The drone has two separate limits, and a load is allowed only if it satisfies both: The crates must fit in the cargo hold, so their combined space must not exceed holdCapacity. The drone must stay within its lifting limit, so their combined weight must not exceed maxPayload. You are given N crates. Crate i takes up space[i] cubic units, weighs weight[i] kg, and earns profit[i]. Each crate is sealed: you either take it whole or leave it behind, and each crate can be taken at most once. Find the maximum total profit from any valid load. Many different loads may reach the same best profit, so output only the maximum profit, not which crates were chosen. The company plans many drones, so a single run of your program must handle T independent test cases, each with its own limits and crates."
Join thousands of developers practicing for Natwest.