Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
they don't need to be unique actually, the solution space is something like 255 * 255 * 255 different colors length and I'm just testing a couple thousands using the standard rng. For a real life scenario you'd probably want that your solution ca be able to generate all the possible colors and not just a subset. Doing so and verifying for such Hamiltonian path are also NP complete problems. Some people are ready for that challenge but not all of them. Your solution as validated here just has to be testable in terms of reproducibility, the pseudo rng for the tests actually allows (and most likely also generates) duplicates it only checks that something like the 10% of the whole possible colors are different, and that for me is a very reasonable number of duplicates allowed.
Same in Ruby, in 2021! One subtlety to add though, as a suggestion: perhaps the 'Randomizer' test could be adjusted to accomodate a more reasonable number of duplicates. It is fairly shocking how many perfectly random coin-tosses come up consecutively heads or tails, and while pseudo-random numbers generated by computers are not perfect, they are actually pretty good nowadays! I see my solution got through on about the sixth or seventh attempt, so it was deemed random enough, but not every time. Not ideal, but not the end of the world either. I would suggest an adjustment.