04 February, 2015

Data Structures: Linked List implementation in C++

Introduction to "Singly Linked Lists"

In this post I will be explaining about Singly liked lists.

Linked Lists are the simplest of the linear data structures. It manages to overcome some of the shortcomings of arrays, like
  • It is dynamic in contrast to arrays(also called as dense lists).
    We can modify the size of the list in the fly.
  • We don't have to specify the size of the linked list at the start like arrays.
But Linked lists has it's own dark side
  • To access an element in the linked list, we have to traverse the whole list. While in arrays, an element can be accessed in O(1). Let it be any element, at any index.


I present to you an easy C++ implementation of linked lists !



Hope it helped.

You can find more on 


Stay tuned for more.

No comments:

Post a Comment