Retired
Combinations of Logs (retired)
Description:
Tim the timber man just finished cutting all his logs. He has n logs (each of which are marked 1, 2, 3... n) and he was wondering how he could order his logs for shipping. He ships in packages of k logs.
Create a program that given a number of logs (n) and a package size (k) will return the ways Tim can order his logs. Your program should return an array of arrays.
Example: With 5 logs and a package size of 3 your program should return [[1,2,3],[1,2,4],[1,2,5],[1,3,4],[1,3,5],[1,4,5],[2,3,4],[2,3,5],[2,4,5],[3,4,5]]
Algorithms
Logic
Similar Kata:
Stats:
Created | May 12, 2017 |
Warriors Trained | 18 |
Total Skips | 0 |
Total Code Submissions | 41 |
Total Times Completed | 10 |
JavaScript Completions | 10 |
Total Stars | 0 |
% of votes with a positive feedback rating | 31% of 8 |
Total "Very Satisfied" Votes | 1 |
Total "Somewhat Satisfied" Votes | 3 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 8 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |