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
- Insert at head
- Insert
- Retrieve
- Index of value
- Find max
Stack
- Push
- Pop
- Size
Queue
- Enqueue
- Dequeue
- Size
Binary Search Tree
- Find max
- Insert
- Remove