Made algorithm independent of the type of the array
Merge https://github.com/dumrelu/Johnson-Trotter-Permutations