Public paste
Undefined
By: Guest | Date: Dec 9 2009 02:53 | Format: None | Expires: never | Size: 300 B | Hits: 717

  1. public void reverse()
  2. {
  3.         dllintnode temp;
  4.         dllintnode current;
  5.         dllintnode val;
  6.         currentpos = front; // the head of the list
  7.         temp = null;
  8.         val = null;
  9.         while(currentpos != null)
  10.         {
  11.                 temp = currentpos.getNext();
  12.                 val.setBack(currentpos);
  13.                 val = currentpos;
  14.                 currentpos = temp;
  15.         }
  16. }
Latest pastes
3 days ago
15 days ago
20 days ago
22 days ago
23 days ago