random shuffle c++ code example
Example 1: shuffle vector c++
std::shuffle(container.begin(), container.end(), std::random_device());
Example 2: shuffle elements c++
random_shuffle(v.begin(), v.end());
std::shuffle(container.begin(), container.end(), std::random_device());
random_shuffle(v.begin(), v.end());