Some code I wrote for a programming problem.