Question 115Asked in BPSC TRE 2.0 (2023) Computer Class 9-10

In the deque implementation, using singly linked list, what would be the time complexity of deleting an element from the rear end?

  1. AO(1)
  2. BO(N log N)
  3. CO(N)
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (C) O(N)

Explanation

In a singly linked list the node before the tail must be found by traversing the whole list, so deleting from the rear takes O(N).

From BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper

This is question 115 of BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.