Implementing an Adjacency List for a Flight Map
<p>I have to implement a flight map's adjacency list for a airline service and I'm having a lot of trouble understanding how to implement this. I have the readFlightMap method already. Which reads in the data and then calls upon the method below in my 2nd for loop which handles the adjacency list file:</p>

<pre><code>// Inserts information into the flight map to record the fact that the
// adjCity is adjacent to aCity.
// Precondition: aCity and adjCity are valid cities that are served
// by the airline.
// Postcondition: The map will have changed to record the given information

public void insertAdjacent(City aCity, City adjCity)
{

}
</code></pre>

<p>My instructor told me to implement a array of linked lists to solve this problem, but this is the picture he showed us in class:</p>

<p>An Array of LinkedLists:</p>

<p>In the | |, the original city positions, then followed by their Adj list.</p>

<pre><code>| Q | -&gt; X&lt;br/&gt;
| X | -&gt; No Adj&lt;br/&gt;
| R | -&gt; X&lt;br/&gt;
| P | -&gt;R -&gt;W&lt;br/&gt;
| W | -&gt;S&lt;br/&gt;
| S | -&gt;T&lt;br/&gt;
| T | -&gt;W&lt;br/&gt;
| Y | -&gt;R -&gt;Z&lt;br/&gt;
| Z | -&gt;No Adj&lt;br/&gt;
</code></pre>

<p>I've searched all over google about how to implement this, but I have not discovered anything that helps. He gave us a ADTList based class, but it only has simple things like add, remove, size, etc and it does not handle the implementation that he suggested to us.</p>

<p>I'm lost.</p>
