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 aircraft_max_revenue. 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 0.
Constraints:
1 length of the cargo array 2,000
1 weight of each cargo =2,000
1 price of each cargo =20,000
1 weight capacity of aircraft =20,000
Your program must meet the following benchmarks, otherwise, the test case will be considered a failure:
If 1 weight capacity of aircraft =1,000, then your program must complete within 2 seconds.
If 1,001 weight capacity of aircraft =5,000, then your program must complete within 4 seconds.
If 5,001= weight capacity of aircraft =10,000, then your program must complete within 8 seconds.
If 10,001 weight capacity of aircraft 15,000, then your program must complete within 11 seconds.
If 15,001 weight capacity of aircraft 20,000, then your program must complete within 15 seconds.
Your function name must be aircraft_max_revenue (all lower case and each word must be separated by an underscore).
Problem Statement: You are a software engineer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!