New answers tagged combinatorics
2
votes
Accepted
Find the list of combination (with repetition) given rank and number of items. (Lexicographic ordering)
First Take
Your code gets the job done and is correct as far as I can tell. It would be more convenient if it was converted to a function. I have taken the liberty to do so as follow:
...
Top 50 recent answers are included
Related Tags
combinatorics × 490python × 152
algorithm × 132
java × 108
performance × 101
programming-challenge × 70
c++ × 67
recursion × 50
strings × 41
python-3.x × 38
time-limit-exceeded × 37
beginner × 34
c# × 29
javascript × 26
array × 23
c × 21
c++11 × 16
haskell × 15
python-2.x × 14
complexity × 14
interview-questions × 12
mathematics × 12
functional-programming × 9
reinventing-the-wheel × 9
comparative-review × 9