The number of derangements of n elements is defined as
    d[0] = 1, d[1] = 0, 
and for n strictly larger than 1:
    d[n] = (n-1)(d_[n-1]+d_[n-2]).
  1. Draw a flowchart for the algorithm to compute a list of the first 10 numbers d[n].
  2. Give the corresponding Python code for this algorithm.