I have a vector generator, which in every step add to a vector X one random element from 1 to 10. It means, that in step 1, X has 1 random element from 1 to 10, in step 2, I add to a X one random element from 1 to 10. That is what I have so far.
But I need help with the next step.
The process must stop when in the vector X are all the elements from 1 to 10. For example, if in step 20 I have in X only elements from 1 to 9 and number 10 is not in X, the process stops when the number 10 is generated.
In every step of generator I want to test, if the X contains all the elements - it means, that I want to test if the vector X contains the vector Y = [1, 2, ..., 10] How can I test that the vector contains elements from another vector?