Can't the Secret Santa problem be solved just by shuffling an array of participants, and assigning a person A[i] to give a gift to a person A[(i+1)%N]?
I have a feeling that this is not correct, but cannot determine why.
This is true if there are no constraints, but the author mentions they introduce constraints like 'a person cannot give to their significant other' (or else it would be too hard to keep it a secret)