The deferred acceptance algorithm, also known as the Gale–Shapley algorithm, solves the stable marriage problem.