Bunch more code for the random number generation interview test - two
implementations for generating random numbers, one that is O(n) and one
that is O(logn)