Complexity in Linked list by R4R Team

Time complexity in Singly Linked list:

Creating linked list : O(n)
Traversing Linked List : O(n)
Insertion at beginning : O(1)
Insertion at last : O(n)
Deletion at beginning : O(1)
Deletion at end : O(n)
Searching of item : O(n)

Time complexity in Circular Linked list:

Creating linked list : O(n)
Traversing Linked List : O(n)
Insertion at beginning : O(n)
Insertion at last : O(n)
Deletion at beginning : O(n)
Deletion at end : O(n)
Searching of item : O(n)

Time complexity in Doubly Linked list:

Creating linked list : O(n)
Traversing Linked List : O(n)
Insertion at beginning : O(1)
Insertion at last : O(1)
Deletion at beginning : O(1)
Deletion at end : O(1)
Searching of item : O(logn)




Leave a Comment:
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!