List vs linkedlist | Sololearn: Learn to code for FREE!


List vs linkedlist

Hi I know difference and use cases of linked list and array... What does this list mean and what is the use cases of same..?

11/28/2019 11:03:42 AM

Ketan Lalcheta

1 Answer

New Answer


Linked list is an ADT (Abstract Data Type) that stores each element in a node and the node either points to null (marks the end of the list) or to the next node in the chain. This basic ADT provides one way access. To each any element you have to start from the start (head node). C++ list is container modelled on this ADT, provides a two way traffic (bidirectional iterator) and implemented internallay using a variation of tree data structure. It provides the basic ADT functionality with additional features. Provides O(1) insertion and deletion. C++ also provides one way list called "forward list" (this is more close to classic ADT) Use case - Use it wherever you need to use a list functionality