title: How do you find multiple ki smallest elements in array?
body: <p>I am struggling with my homework and need a little push- the question is to design an algorithm that will in O(nlogm) time find multiple smallest elements <code>1&lt;k1&lt;k2&lt;...&lt;kn</code> and you have m *k. I know that a simple selection algorithm takes o(n) time to find the kth element, but how do you reduce the m in your recurrence? I though to do both k1 and kn in each run, but that will only take out 2, not m/2. </p>
  
  <p>Would appreciate some directions.
  Thanks   </p>