12. June 2014

A Lottery Model

Having studied math in university, I am well aware that buying lottery tickets is a losing proposition. In Ontario, where I live, there is a lottery called 6/49. The rules are simple: pick 6 numbers out of 49 possibilities, if your choice matches a random choice of 6 numbers made in the draw, you win the jackpot. The probability of winning this is:

more

09. May 2014

Counting sort

I have a thing for sorting algorithms. They’re fairly accessible as far as algorithms go, and it’s always fun to look under the hood of how computers go about their business. Thinking algorithmically makes you a better programmer too.

more