From: Robert Klemme Date: 2012-11-30T20:54:11+09:00 Subject: Re: Getting the smallest Items of an Array On Thu, Nov 29, 2012 at 10:14 PM, Frank Fischer wrote: > I agree with Robert, using #sort is probably the simplest approach and > reasonably fast in most situations. This is exactly what I would do. > But I also like playing around with algorithms ;) I put a few more variants which traverse the original Enumerable just once up at github to play around with: https://gist.github.com/4175335 Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/