title: Throwing the fattest people off of an overloaded airplane.
body: <p>Let's say you've got an airplane, and it is low on fuel.  Unless the plane drops 3000 pounds of passenger weight, it will not be able to reach the next airport.  To save the maximum number of lives, we would like to throw the heaviest people off of the plane first.  </p>
  
  <p>And oh yeah, there are millions of people on the airplane, and we would like an optimal algorithm to find the heaviest passengers, without necessarily sorting the entire list.</p>
  
  <p>This is a proxy problem for something I'm trying to code in C++.  I would like to do a "partial_sort" on the passenger manifest by weight, but I don't know how many elements I'm going to need.  I could implement my own "partial_sort" algorithm ("partial_sort_accumulate_until"), but I'm wondering if there's any easier way to do this using standard STL.</p>