This does not seem like a good question for auditing purposes: Algorithm : Letters and envelopes pairing
It does not appear to be about programming, it appears to be "what's your favorite greedy algorithm", and would probably be a better fit for a math/puzzles site.
Forgive me if I am missing something really obvious.