
16 Aug
2009
16 Aug
'09
12:12 a.m.
Hello all, I'm trying to build a function that takes a string such as "123" and gives me permutations including permutations with lesser list lengths. I'm not sure how to phrase it, but here is what the output could look like: foo "123" => ["123","213","321","231","312","132", "12", "13", "21", "23", "31", "32", "1", "2", "3", ""] The ordering doesn't matter, and that null list at the end doesn't particularly matter, but I don't really know the mathematical phrasing of what I'm asking for. I'm trying to build a scrabble helper that can find the optimal score given a set of letters to work with. Thanks for your help, Ian Duncan