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 4 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 4 years ago

c) O(n)