From: Martin DeMello Date: 2005-03-17T14:14:46+09:00 Subject: Re: Stable sort? Hal Fulton wrote: > > Does "merge" imply two lists? I'm just looking at a single list. It's a recursive algorithm: def sort(ary, from, to) mid = (from + to)/2 merge( sort(ary, from, mid), sort(ary, mid+1, to)) end 'merge' interleaves two already-sorted sublists. martin