Closed vilvl closed 1 year ago
ow, i see
well, i guess you don't need an array, but i just thought it convenient in this exercise. if you have n = 6 for example, i would initialize the array to be: {0,1,2,3,4,5,,,,} and then i would use the recursion to change the last digit(s) and print it out the first n integers of the array after each change. so it would be like: {0,1,2,3,4,5,,,,} {0,1,2,3,4,6,,,,} ... {0,1,2,3,4,9,,,,} {0,1,2,3,5,6,,,,} ... {4,5,6,7,8,9,,,,}
https://github.com/ChimPansky/42vienna/blob/1fbf8d0e10c40ed62d62aae1df7e148b2b844a28/C00/ex08/ft_print_combn.c#LL70C2-L70C2