What is the worst case time complexity of inserting a node in a doubly linked list?

Q & ACategory: Data StructureWhat is the worst case time complexity of inserting a node in a doubly linked list?
Admin Staff asked 5 years ago

What is the worst case time complexity of inserting a node in a doubly linked list?
a) O(nlogn)
b) O(logn)
c) O(n)
d) O(1)

1 Answers
Admin Staff answered 5 years ago

c) O(n)