I'd like to figure out the best way to implement a circular list ( assume I'm developing a "generic" circluar list ). I have a few questions:
1. Is it possible to implement the STL <list> to make it function as a circular list?
2. If I create my own template circular list should I:
a. Use a "sentinel" node that head->prev and tail->next point to or,
b. Have head->prev and tail->next point to each other?
For my second question, my intuition tells me to implement a sentinel node.
I'd really like to be able to use the STL <list> though, as that should involve significantly less coding.