Combinations of size k. Modify Combinations from the previous exercise so that it takes two integer command-line arguments n and k, and prints all C(n, k) = n! / (k!(n − k)!) combinations of size k. For example, when n = 5 and k = 3, you should get the following output:
abc abd abe acd ace ade bed bee bde cde
Previous Exercise
Combinations. Write a program Combinations that takes an integer command-line argument n and prints all 2n combinations of any size. A combination is a subset of the n elements, independent of order. As an example, when n = 3, you should get the following output:
a ab abc ac b be c
Note that your program needs to print the empty string (subset of size 0).
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.