Const tracing array in random order

I want to...

std::random_shuffle(begin(a), end(a));
for (auto x : a) {
  use(x);
}

      

... but a

- const

. Is the possibility of random ordering possible in O (n) time and O (1) space?

+3


source to share





All Articles