Let P be a singly linked list. Let Q be the pointer to an intermediate node x in the list. What is the worst-case time complexity of the best known…

Let P be a singly linked list. Let Q be the pointer to an intermediate node x in the list. What is the worst-case time complexity of the best known algorithm to delete the node Q from the list?

  1. a) O(n)
  2. b) O(log₂ n)
  3. c) O(log n)
  4. d) O(1)

From the Combined Bank Assistant Programmer (CSE) February 2024 – Written (BIBM) exam, question 30 of 41.

More from this paper