Question: Our homework assignment asks us to prove that the Java `LinkedList` implementation is doubly-linked and not singly-linked. However, list operations such as adding elements, removing elements, and looking elements up seem to have the same complexity for both implementations, so there doesn't seem to be a way to use a performance argument to demonstrate the doubly-linked nature of Java's `LinkedList`. Anyone know of a better way to illustrate the difference between the two?

Answer: 
Look at iterating in forward or backward direction, removing the "before-last" element, and such.
It's quite an easy proof -- you look at the source code and see that each node has a `.previous` pointer :)
<http://www.docjar.com/html/api/java/util/LinkedList.java.html>