Shuffle list in c ++

-1

I want to know how I can, given a list, shuffle the order of the elements within it. The type structure of the list I want to shuffle is as follows.

struct exemplo {
  int I;
  int O;
  int V;
  struct exemplo *prox;
}
    
asked by anonymous 17.07.2018 / 17:58

1 answer

0

Probably using the rand () function that generates a number from 1 to 3, then with those numbers you change the elements you have in that random order list

    
02.08.2018 / 23:59