Pregunta de entrevista de Genentech

How would you write a sorting function?