Using the given SList as a template to implement a doubly linked list with the following functionalities

  1. 1. Add first: add an element to the head of the list
  2. 2. Add last: add an element to the end of the list
  3. 3. Print: print the content of the list starting from the head
  4. 4. Find: a private method that will return a reference to a node if it contains the same value of a given argument
  5. 5. Insert after: a method that takes a key and a value and then insert the value after the node containing the same value as the given key. If there is no node matching the given key, add the new node to the end of the list.
  6. 6. Implement a copy constructor for the list
  7. 7. Implement a list iterator class for the your doubly-linked list following the standard Java ADT usage of iterator, and demonstrate its usage in a driver code.
  8. please use comments and allow for easy copy&paste

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *