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.
In reply to Re^4: Adding Special Rules to Sort
by tilly
in thread Adding Special Rules to Sort
by ctfishman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |