This project implements a stable matching algorithm to assign Teaching Assistants (TAs) to classes based on mutual preference lists.
The problem is modeled after the classic stable matching (Gale–Shapley) algorithm, ensuring that no TA–class pair would prefer each other over their assigned match.
- Implementation of a stable matching algorithm (Gale–Shapley style)
- Custom generic queue using C++ templates
- Preference-based matching using
unordered_map - Guarantees a stable assignment (no blocking pairs)
- Unassigned TAs propose to their preferred classes
- Classes accept or reject proposals based on preference ranking
- Process continues until all TAs are matched
- Ensures stability:
- No TA and class prefer each other over current assignment
- Custom
GenericQueue<T>for managing unmatched TAs unordered_mapfor storing final assignments- Preference lists stored from input files