in reply to Re^2: Adding Special Rules to Sort
in thread Adding Special Rules to Sort

I hate to disagree

One 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.


I'm not really a human, but I play one on earth My Petition to the Great Cosmic Conciousness

Replies are listed 'Best First'.
Re^4: Adding Special Rules to Sort
by tilly (Archbishop) on Feb 28, 2009 at 17:50 UTC
    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.

      Contrary to your claim that "he can figure it out", my experience of interviewing candidates says that most can't.

      That's exactly why I said I would do it for a fee. It's real work correctly doing that sort of mathematical modelling.

      I note that your "transitive closure" method does not include a complete solution either.

      I also defend an alternative method of properly setting up hash keys (maybe AoA as values?) and doing the conventional cascading hash sort, including a subsort on the AoA's.

      It also begs questions like does point difference matter in the wins? Or is it just a binary value. etc. etc.

      So I may have flunked your interview......but that's because I'm more creative, or at least differently trained than you.

      No offense.... but your transitive sort dosn't really lead to a general purpose solution, and there is no saying whether your transitive method is the best. I admit you are one of the few who have attempted a solution to the team rankings problem.


      I'm not really a human, but I play one on earth My Petition to the Great Cosmic Conciousness
        Go back and read the original problem. There is a specification given. Debating whether another specification may be better (eg do points won by matter) is irrelevant, we are given the spec. There are 6 parts to the spec. The original poster claims to know how to do 5 parts of it correctly, and shows enough code to demonstrate that. The problem is that condition 3 is hard. The question is therefore, "How do I handle condition 3?"

        Your answer pointed the original poster at different ways to do the bits that could already be done. It offered no help on condition 3. Therefore it did not address the question asked

        My answer explained how to calculate that condition. I did not do the rest of the spec because I believe that the original poster can do that. Plus it is boring work.

        If you wish to continue defend your answer on the grounds that it demonstrates that you have the "creativity" to answer the question that wasn't asked, and not answer the question that was, well, I don't quite know what to say to that. The situation pretty much speaks for itself.

        Anyways we're now going in circles. Unless you have a response that breaks new ground, I won't be responding again in this thread.