title: Doubly Linked Lists Implementation
body: <p>I have looked at most threads here about Doubly linked lists but still unclear about the following.</p>
  
  <p>I am practicing the Goodrich and Tamassia book in Java. About doubly linked lists, please correct me if I am wrong,  it is different from a singly linked list in that a node could be inserted anywhere, not just after the head or after the tail using both the next and prev nodes available, while in singly linked lists, this insertion anywhere in the list is not possible?</p>
  
  <p>If one wants to insert a node in a doubly linked list, then the default argument should be either the node after the to-be inserted node or node before the to-be inserted node ? But if this is so, then I don't understand how to pass the node before or after. 
  Should we be displaying all nodes that were inserted till now and ask the user to select the node before or after which some new node is to be inserted ? My doubt is how to pass this default node. Because I assume that will require the next and prev nodes of these nodes as well.</p>
  
  <p>For e.g, <code>Head&lt;-&gt;A&lt;-&gt;B&lt;-&gt;C&lt;-&gt;D&lt;-&gt;E&lt;-&gt;tail</code></p>
  
  <p>If Z is the new node to be inserted after say D, then how should node D be passed? I am confused with this though it seems pretty simple to most. </p>
  
  <p>But pl do explain. </p>
  
  <p>Thanks,
  Sanjay</p>