Homework 2

For each of the following operations on the given data structure, tell if the operation can/could/should throw an exception. If so, in what circumstance should the exception be thrown, and which exception from the std::exception hierarchy should it be?
    Singly-Linked List
  1. Insert at head
  2. Insert
  3. Retrieve
  4. Index of value
  5. Find max
  6. Stack
  7. Push
  8. Pop
  9. Size
  10. Queue
  11. Enqueue
  12. Dequeue
  13. Size
  14. Binary Search Tree
  15. Find max
  16. Insert
  17. Remove