Implements the Gale-Shapley algorithm to solve stable matching problems for two-sided markets like residency and admissions.
This skill provides specialized implementation patterns for the Gale-Shapley algorithm, the gold standard for solving stable marriage and two-sided matching problems. It allows Claude to generate robust, stable matching logic where no two entities would prefer to be paired with each other over their current assignments. Based on Peter Norvig's algorithmic patterns, it is ideal for building systems for hospital-resident matching, college admissions, and automated recruitment platforms where preference-based stability is critical.
Key Features
01Proposer-optimal Gale-Shapley implementation
02Efficient O(n^2) time complexity patterns
03Support for strict preference ordering
04Optimized preference lookup via pre-sorting
05Guaranteed stable matching with no blocking pairs
061 GitHub stars
Use Cases
01Implementing automated college admissions and school choice placements
02Designing medical residency and hospital-resident matching systems
03Building job candidate matching platforms for two-sided recruitment markets