From: Todd Benson Date: 2008-11-29T18:23:57+09:00 Subject: Re: Programming Noob Chris Pine Tutorial sorting without use of array.sort method On Fri, Nov 28, 2008 at 5:29 PM, William James wrote: > On Nov 27, 5:22 pm, Todd Benson wrote: > >> Cheating... >> >> a = my_word_array >> sorted = [] >> while !a.empty?; sorted << a.delete(a.min); end > > Fails when there are duplicates. Absolutely. But, read the question again. It's ambiguous if words can be duplicated or not in the result. I thought about this for a little while, and that's why I said "Cheating..." Todd