How to solve the Secret Santa Problem using graph theory

graph-theoryalgorithmshamiltonian-cyclebacktracking

Abstraction: Secret Santa assignment as Hamiltonian cycle solved with backtracking DFS

Key points:

Connections: Graph Theory · Backtracking Search · Np Problems

Source: https://medium.com/pragmatic-computer-science/how-to-solve-the-secret-santa-problem-using-graph-theory-a6b216ccc622