Skip to content
Gatebreaker

Learn

  • Dashboard
  • Syllabus
  • Questions
  • PYQ Bank
  • Tests
  • Mocks

Improve

Community

Me

You are browsing as a guest. Sign in to attempt questions and track your preparation.

Create free account

Questions

Sign inCreate account

70days to GATE 2027

Exam date 6 Feb 2027

Back to list
1 of 2 PrevNext

Programming & Data StructuresGATE DA 2024, Q5

NATEasyPYQ 20241 mark

The fundamental operations in a double-ended queue D are:

insertFirst(e) - Insert a new element eee at the beginning of DDD.
insertLast(e) - Insert a new element eee at the end of D .
removeFirst()-Remove and return the first element of D.
removeLast () - Remove and return the last element of D.

In an empty double-ended queue, the following operations are performed:

insertFirst (10)
insertLast (32)
a←a \leftarrowa← removeFirst ()
insertLast (28)
insertLast(17)
a←a \leftarrowa← removeFirst ()
a←{a} \leftarrowa← removeLast ()

The value of a{a}a is _________ .

Pick an answer, then press Check. You will be asked to sign in first.