Introduction - If you have any usage issues, please Google them yourself
The list data structure allocates and deallocates memory as needed therefore, it does not allocate memory that i s not currently using. Memory is freed when an element is removed the list.
Lists are efficient when inserting new elements in the list this is an O(1) operation. No shifting is required like with vectors.