Gale–Shapley algorithm

The Gale–Shapley algorithm finds a stable matching by having one side propose in turn while the other side tentatively keeps its most-preferred offer. It terminates with no unmatched pair that would both prefer each other to their assignments.

Connect