about | help | code help+videos | done | prefs |
lexicographicPermutation
For integer n (assume n is between 1 and 9), we define lexicographic permutation as a permutation of digits 1, 2, ..., n such that permutation-k (k starting from 0) is greater than the permutation-(k-1).
lexicographicPermutation(3, 3) → "231" lexicographicPermutation(5, 10) → "13524" lexicographicPermutation(8, 0) → "12345678" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 6 Post-solution available
Copyright Nick Parlante 2017 - privacy