title: Why do adjacency lists use lists of LinkedLists?
body: <p>One thing that I have been wondering recently is why the convention is to build adjacency lists as an array of LinkedLists.  LinkedLists have an element access time of O(n) because you potentially have to step through every element in the list to reach the one you are looking for.  Why not use something like an ArrayList or a HashSet which has a constant access time to create adjacency list instead?</p>