# Exercise 10.3.1

Draw a picture of the sequence $\langle 13, 4, 8, 19, 5, 11 \rangle$ stored as a doubly linked list using the multiple-array representation. Do the same for the single-array representation.

Let the indexes start from 1. To make things interesting, let's write the elements in increasing order:

+---+
| L |--------------------------------------+
+---+                                      V
1    2    3    4    5    6    7    8    9   10   11   12
+----+----+----+----+----+----+----+----+----+----+----+----+
next |    |  5 |    |  7 | 10 |    |  / |  2 |    |  4 |    |    |
+----+----+----+----+----+----+----+----+----+----+----+----+
key |    |  4 |    |  5 |  8 |    | 11 | 13 |    | 19 |    |    |
+----+----+----+----+----+----+----+----+----+----+----+----+
prev |    |  8 |    | 10 |  2 |    |  4 |  / |    |  5 |    |    |
+----+----+----+----+----+----+----+----+----+----+----+----+


I'll do the next one in a slightly more compact fashion:

   1    2    3     4    5    6     7    8    9    10   11   12
+----+----+----++----+----+----++----+----+----++----+----+----++--
|  4 |  7 | 13 ||  5 | 10 | 16 ||  8 | 16 |  1 || 11 |  / |  4 ||
+----+----+----++----+----+----++----+----+----++----+----+----++--

13   14   15    16   17   18
--++----+----+----++----+----+----+
|| 13 |  1 |  / || 19 |  4 |  7 |
--++----+----+----++----+----+----+