Question: Problem Statement: You are a software engineer for a cargo airline company. You want to develop a program that, based on the pool of possible
Problem Statement:
You are a software engineer for a cargo airline company. You want to develop a program that, based on the pool of possible cargo and weight capacity of the aircraft, you want to output the maximum revenue that the aircraft can generate.
Call your function aircraftmaxrevenue. Note that the function name is case sensitive and you will get points deducted if your function name doesn't exactly match the function name mentioned in this document.
Inputs are the following:
Pool of possible cargo this is an array of tuples, containing the weight of each individual cargo first value of the tuple and the price the cargo owner is willing to pay your company to transport said cargo second value of the tuple Both values within the tuple will have a data type of integer.
Weight capacity of the airline this is an integer. The max weight of cargo the aircraft is able to transport.
Return data type must be an integer.
If no cargo can be taken, then your max revenue should be
Constraints:
length of the cargo array
weight of each cargo
price of each cargo
weight capacity of aircraft
Your program must meet the following benchmarks, otherwise, the test case will be considered a failure:
If weight capacity of aircraft then your program must complete within seconds.
If weight capacity of aircraft then your program must complete within seconds.
If weight capacity of aircraft then your program must complete within seconds.
If weight capacity of aircraft then your program must complete within seconds.
If weight capacity of aircraft then your program must complete within seconds.
Your function name must be aircraftmaxrevenue all lower case and each word must be separated by an underscore
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
