Microsoft Interview Question: How to shuffle a deck of card... | Glassdoor

Interview Question

Software Development Engineer Interview(Student Candidate) Seattle, WA

How to shuffle a deck of card? (collage interview)


Interview Answer

1 Answer


here is my weird solution inspired from my simulation clas.

assign numbers to each card 1 to N. and generate random numbers, say 1 to 10 billion.

assign each card number a randomly generated number and rank random numbers from min to max. here you have shuflled cards.

uha1 on Feb 6, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.