fork(1) download
  1. #include <string>
  2. template<typename T>
  3. void shuffle(T &array, size_t size) {
  4. for(int i = 0; i < size; ++i) {
  5. int index = i % size;
  6. std::swap(array[i], array[index]);
  7. }
  8. }
  9. int main() {}
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
Standard output is empty