and thanks for helping. I am confused with Tideman, and would love some enlightenment:
I successfully sorted pairs, and can't figure out, in order to fill the bool locked, how to link the candidates to the pairs.
Once my pairs are sorted, their link with candidate_count is lost right? So, how can the bool array know to which candidates belongs each pair?
Thanks again, and sorry about my English. Best!