A classic sorting code-golf question
Haskell, 87 80 89
s%[]=s
(x:a)%q|x&lt;=q!!0=x:a%q
p%q=q%p
j(x:y:s)=x%y:j s
j a=a
r[x]=x
r s=r$j s
s=r.map(:[])

This is merge sort, implemented from the bottom up.
first we package every element into it's own list, and then merge them two-by-two, and again merge them two-by-two, until we're left with one list.
(%) is the merge function 
j merges pairs in a list of lists 
r merges a complete list of lists 
s is the sorting function. 
Usage:
Run an interpreter, and enter s [3,5,2,6,7].
Edit:
the way I was merging things before wasn't the right order, So to fix it I needed 9 more characters.