Skip to content

Instantly share code, notes, and snippets.

View shaunlgs's full-sized avatar
🌴
On vacation

Shaun Ling shaunlgs

🌴
On vacation
View GitHub Profile
@shaunlgs
shaunlgs / lehmer-code
Last active August 29, 2015 14:04
Generate permutations of string using lehmer code
// Pseudocode
integer = 0
while integer != factorial(string.length):
code = integerToCode(integer)
print codeToPermutation(string, code)