Question: In a doubly linked list, what is the time complexity of inserting a new node after a given node?
Options:
Correct Answer: O(1)
Solution:
Inserting a new node after a given node in a doubly linked list involves changing a few pointers, which takes constant time, hence O(1).