In: Computer Science
Sorry now I want this question to be answered
Write a group of template functions for
examining and manipulating a collection of
items via the collection’s forward iterator.
For example, one of the functions might have
this prototype:
template <class Iterator, class T>
Iterator find(
Iterator begin,
Iterator end,
const T& target
);
The find function searches the range starting at
*begin and going up to (but not including) *end. If
one of these elements is equal to the target, then the
iterator for that element is returned; if the target is
never found in the range, then the end iterator is
returned.
Discuss and design other functions for your tool-
kit that manipulates a collection. As a starting point,
please use the linked-list toolkit from the previous
chapter.