Reading time: 30 minutes | Coding time: 10 minutes
List, as the name suggests, is the container to store the homogeneous data (data of the same type). It allocates memory based on a non-contiguous scheme. As compared to arrays/vector, the C++ list has some trade-offs. Before going forward,if you don't know about linked lists, I would recommend you to do check out the article on the singly-linked list and doubly-linked list by Rahul Kumar.
Unlike arrays that provide O(1) lookup time, in lists, w...
Published on June 13, 2020 08:06