In a standard linked-list implementation of a queue that maintains both front…

TPSC Computer/IT Posts · 2024 · Assistant Chief Electoral Officer (Computerization) · from our data (question pool)

In a standard linked-list implementation of a queue that maintains both front and rear pointers, compare the time complexity of enqueue and dequeue operations.

  1. A.

    Enqueue : O(n), Dequeue : O(1)

  2. B.

    Enqueue : O(1), Dequeue : O(n)

  3. C.

    Both : O(1)

  4. D.

    Both : O(n)

Attempted by 535 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…