Genentech Interview Question

How would you write a sorting function?