Creating a Deque Class methods
<p>I need to write my own Deque class and must used a doublylinked list implementation to store data. the problem is writing the method pushfromLeft(Thing thing) which will insert into the left side of the deque. Below is what I have thus far but does not seem to work. </p>

<pre><code> public void pushLeft(Thing thing) {
         Node beg = new Node();  
         Node end = new Node();
         Node T = new Node();  

       if(isEmpty())
       { 
             beg = first;
             end = last;
             beg = end;
             T = beg.thing;
             N++;
       }
       else
       {
             beg = beg.next;
             end = end.next;
             T = beg.previous;
             N++;


       }
</code></pre>
