employer cover photo
employer logo
employer logo

National Instruments

Is this your company?

National Instruments Interview Question

Design an algorithm that would shuffle a deck of cards

Interview Answer

Anonymous

Apr 9, 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