Question d’entretien chez Scott Logic

Sorting red and blue counters logic question