Genentech interview question

How would you write a sorting function?