Question: In a doubly linked list, what is the time complexity of deleting a node given a pointer to that node?
Options:
Correct Answer: O(1)
Solution:
If you have a pointer to the node to be deleted, you can adjust the pointers of the adjacent nodes in constant time, so the time complexity is O(1).