hamburger menu
All Coursesall course arrow
adda247
reward-icon
adda247
    arrow
    arrow
    arrow
    A queue in which addition as well as deletion of elements can take place at both the ends is called
    Question

    A queue in which addition as well as deletion of elements can take place at both the ends is called

    A.

    Simple queue

    B.

    Circular queue

    C.

    Double-ended queue

    D.

    Priority queue

    Correct option is C

    A double-ended queue (deque) is a special type of linear data structure in which elements can be inserted and deleted from both the front and the rear ends. It generalizes the simple queue, where insertion is done at the rear and deletion at the front, by removing this restriction.

    Important Key Points:

    1. A deque (double-ended queue) supports both enqueue and dequeue operations at both ends.
    2. It is useful in applications where flexible data insertion and deletion is needed (e.g., sliding window problems, task schedulers).
    3. Deques can be input-restricted or output-restricted, depending on whether insertion or deletion is restricted to one end.

    Knowledge Booster:

    • Simple queue: Allows insertion at rear and deletion from front only; does not support operations at both ends.
    • Circular queue: A queue where the last position is connected back to the first to form a circle; insertion and deletion are still limited to rear and front respectively.
    • Priority queue: Elements are inserted based on priority; not position-based (front/rear) but priority-based insertion and removal.

    Free Tests

    Free
    Must Attempt

    UP SI 2025 Full Mock Test : 01

    languageIcon English
    • pdpQsnIcon160 Questions
    • pdpsheetsIcon400 Marks
    • timerIcon120 Mins
    languageIcon English
    Free
    Must Attempt

    UP Police Constable Full Mock Test 01

    languageIcon English
    • pdpQsnIcon150 Questions
    • pdpsheetsIcon300 Marks
    • timerIcon120 Mins
    languageIcon English
    Free
    Must Attempt

    Government Policies and Scheme

    languageIcon English
    • pdpQsnIcon10 Questions
    • pdpsheetsIcon20 Marks
    • timerIcon5 Mins
    languageIcon English
    test-prime-package

    Access ‘UPSSSC’ Mock Tests with

    • 60000+ Mocks and Previous Year Papers
    • Unlimited Re-Attempts
    • Personalised Report Card
    • 500% Refund on Final Selection
    • Largest Community
    students-icon
    353k+ students have already unlocked exclusive benefits with Test Prime!
    Our Plans
    Monthsup-arrow