Answer the question
In order to leave comments, you need to log in
How to generate all possible variants of X values?
Hello Podzagot
how to generate all possible options from a list of values. I remember that it refers to combinatorics, sort of, but I don’t remember it.
Let's say there are 1 and 2 and we have two options at the output: 12 and 21. And if we have more numbers / values, then how to implement it?
Answer the question
In order to leave comments, you need to log in
I didn't know, and I forgot. Combinatorial iterators will help.
https://www.programmingalgorithms.com/algorithm/br... simple brute force
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question