In this article we will discuss how to add elements in LinkedList and then display them.

Lets create a LinkedList of String i.e.

To add elements in LinkedList we will use its add() function i.e.

add() member function of LinkedList always appends the element in the end of LinkedList.

Let’s see how to use the member function to add String elements to LinkedList i.e.


As we can see the elements in the LinkedList are stored in the order in which they were added. This proves that LinkedList is an ordered collection.


In above example we inserted 3 elements at the end of LinkedList.

Python Recommendations:

C++ & C++11 Recommendations:

If you didn't find what you were looking, then do suggest us in the comments below. We will be more than happy to add that.

Subscribe with us to join 1500+ Python & C++ developers, to get more Tips &  Tutorials like this.