Skip to content

Instantly share code, notes, and snippets.

View MyGGaN's full-sized avatar

Fredrik Svensson MyGGaN

  • Generic Mobile Sweden AB
  • Lund, Sweden
View GitHub Profile
@MyGGaN
MyGGaN / Problem
Last active August 29, 2015 13:57
Code golf card position probability
By simulating one milion times you should determine the probability that two cards
of the same value lies directly next to each other one or more times in a shuffled
deck. You may only use standard libraries of the language of your choise. The
result should be printed, eg. "0.95", and then the program should end. You're not
allowed to start your program with any parameters. Eg. if you're using JavaScript
you may start your program like so:
> node mySolution.js
0.95