Gale-Shapley algorithm

  • Hi,

    I am looking around online and have seen implementations of the gale-shapley algorithm in C++, Java, Perl, etc. I am curious as to if the algorithm can be used in databases with SQL as well and would like to know if anyone out there has tried using it before...and if so, how did you implement it?

  • Joe Celko has the stable marriage problem (which I believe you are looking for) in his book: SQL Puzzles and Answers 2nd edition.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply