Solution to "Enumerating Gene Orders"

http://rosalind.info/problems/perm/