List in C++ STL
Lists are sequence containers that allow constant time insert and erase operations anywhere within the sequence, and iteration in both directions. As compared to vector, list has slow traversal, but once a position has been found, insertion and deletion are quick. List containers are implemented as doubly-linked lists For implementing a singly linked list, we…