Questions
Answer the following questions to test your knowledge of this chapter:
- Describe how an element is added to a vector that is expanding dynamically.
- What distinguishes inserting an element at the front of a linked list from inserting it at the front of a vector?
- Implement a hybrid data structure that stores its elements as a vector and a list, respectively. Pick the underlying data structure that implements the operation in each case as quickly as possible.
- How would a binary search tree look if 100 elements were added in increasing order?