Skip to content

Commit 13f9825

Browse files
committed
Added gale_shapley.cpp in greedy_algorithms
1 parent 321ff76 commit 13f9825

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

greedy_algorithms/gale_shapley.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/**
2+
* @file
3+
* @brief Stable Marriage Problem implementation
4+
* @details
5+
* This implementation utilizes the Gale-Shapley algorithm to find stable matches
6+
* between men and women based on their preferences.
7+
*
8+
* **Stable Marriage Problem** aims to find a stable matching between two equally sized
9+
* sets of elements given an ordinal preference for each element. The algorithm was
10+
* introduced by David Gale and Lloyd Shapley in 1962.
11+
*
12+
* @author [B Karthik](https://github.com/BKarthik7)
13+
*/
14+
115
#include <iostream>
216
#include <vector>
317
#include <cstring>

0 commit comments

Comments
 (0)