M
M
Maxim Siomin2020-07-18 21:10:15
C++ / C#
Maxim Siomin, 2020-07-18 21:10:15

How to shuffle vector?

There is a vector, for example:

#include <iostream>
#include <vector>

using namespace std;

int main()
{
vector<string> array { "a", "b", "c", "d", "e"};
}

In python it will be the same:
import random

array = {'a', 'b', 'c', 'd', 'e'}
random.shuffle(array)

In general, I need to shuffle its elements

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
inFureal, 2020-07-18
@inFureal

When will you start googling ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question