C++ circular-list class with efficient storage and sorting.