Question d’entretien chez Weedmaps

General sorting algorithm with a simple caveat. Do not remember the specific question at this time.