Movies on Flight

You are on a flight and wanna watch two movies during this flight.

You are given a list of integers which includes all the movie durations and also given the duration of the flight which is d in minutes.

This is a companion discussion topic for the original entry at