Pergunta de entrevista da empresa 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.

Respostas da entrevista

Sigiloso

28 de ago. de 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.

Sigiloso

4 de out. de 2022

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