Using 2 dimensional array as a linked list.

The array used is a array of nodes, each node being array of length 2.
element 0 in node is the value, element 1 being the reference.