How on Earth is this meant to be an answer to the question that is being asked?
It is clear to me that the OP knows very well how to sort in Perl, and how to do tricky sorts with complex combinations of criteria. The problem is how to do a sort based on the head to head criteria. Your answer does nothing to help with that problem. | [reply] |
I hate to disagreeOne part to his multipart criteria.....
Using the built in sort allows me to do everything I want except deal with criteria 3 correctly. ......i.e. head to head wins Now all he has to do is setup a hash key on who won head to head......the most creative way to do this, is up to debate. My answer pointed the way to sorting HoH, and yes, I did not specifically give code to do this, but I feel he can figure that much out, or hire someone who can. I will do it for a small fee.n ;-) Proper setup, and reliability testing is not some easy code, as the rest of the nodes show, there are alot of variables.....head to head wins in pre-season, regular season, post season, etc....alot of complications. Not to mention his additional sorting criteria.
| [reply] |
Point missed, again.
The main challenge here is how to set up the head to head criterion while dealing with the prospect of cycles. That is not something that general advice about sorting algorithms is going to be any help with. As my answer makes clear, the key concept you need is that of a transitive closure.
Contrary to your claim that "he can figure it out", my experience of interviewing candidates says that most can't. Heck, most programmers can't even do a simple breadth first search. And that is when they know exactly what they are supposed to do.
| [reply] |