Monday, August 22, 2011

Managing an airport

You are the manager of an airport and have a collection of N airplanes arriving at time a(i), leaving at time l(i) and paying p(i) for occupying one of the available K runaways (where K is << N). Write a program for maximizing your gain in terms of money.  Write a program for maximizing the usage of the K runaways.

3 comments:

  1. I am the manager of airport(owner of runways) or owner of planes. It's ambiguous in the question.

    I didn't get the question clearly. What do you mean by maximizing the usage of the K runaways? Also "maximizing your gain" mean "maximizing rent of runways" or "minimize rent of runways."

    ReplyDelete
  2. We can do it in 3n/2 # of comparisons.
    http://tech-queries.blogspot.com/2011/02/find-minimum-and-maximum-in-array.html

    ReplyDelete