Pregunta de entrevista de Intel Corporation

Write a code which gets an array of size N with Natural numbers in it. The code needs to give every time a differet permutation of itself.

Respuestas de entrevistas

Anónimo

28 ago 2018

I used a rand() twice to get 2 indexes randomly every time, and put modulo (%N) on the value to be in the range of the indexes.

Anónimo

4 oct 2022

What mean every time a differet permutation? As I know set of permutations is finite.