The code for this assignment is available
here
.
n = 100
n = 1000
n = 10000
n = 100000
n = 1000000