Pergunta de entrevista da empresa National Instruments

Design an algorithm that would shuffle a deck of cards

Resposta da entrevista

Sigiloso

9 de abr. de 2016

Give each card a randomly generated real number between 0.0 and 1.0. Sort the cards based on the associated numbers. O(n log n). Use a good source of randomness.

1