Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Shuffle

Write a method to shuffle a deck of cards. It must be a perfect shuffle - in other words, each of the 52! permutations permutations of the deck has to be equally likely. Assume that you are given a random number generator which is perfect.

Solutions:

Swift

O(n)

C++

O(n)

Installation

Run make to build and run C++ files and run Swift files. Or you can run .playground file.