The following is a solution to the random walk exercise in Assignment 4 by a student. It is correct
but very slow for large values of n.
Fig: 1
Fig: 2