Complexity for doubly linked lists

Here is the best, worst, and average-case complexity for doubly linked list operations. It is similar to that of singly linked list operations:

Operation

Time Complexity: Worst Case

Time Complexity: Average Case

Insert at beginning or end

O(1)

O(1)

Delete at beginning or end

O(1)

O(1)

Search

O(n)

O(n)

Access

O(n)

O(n)

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset