Implementation of the choice of the best candidate in the comparator