+ 27
how to get all possible combination from a set of integers and print in ascending order?
input: 1 2 output: 1 2 12 21
3 odpowiedzi
0
range of integers?
number of integers?
is 1+22 in front of 1+1+3?
0
Simple- take a cartesian product of the sets and then order them by the leading element of the ordered pairs.
0
Here you go: https://code.sololearn.com/cI9pn9700N56 (use comb_all(); )