Question: h. Suppose that you are a software engineer who is working on design of an inflight entertainment system with on-demand movie streaming. Users on longer

 h. Suppose that you are a software engineer who is working

h. Suppose that you are a software engineer who is working on design of an inflight entertainment system with on-demand movie streaming. Users on longer flights like to start each movie right when their previous one ends, but they complain that the plane usually lands before they can see the ending. So you need to build a feature for choosing movies whose total runtimes will equal the exact flight length. Your input is a flight duration (in minutes) and a list of movie lengths (in minutes). Your algorithm should return a boolean value indicating whether there is a set of movies such that their total length equals the flight duration. You may assume that users will watch at most three movies during a flight. The algorithm should be as fast as possible

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 Databases Questions!