Computer Science, asked by yashkshinde200, 7 days ago

After performing these set of operations, what does the final list look contain? InsertFront(11);
InsertFront(22);
InsertRear(33);
DeleteFront();
InsertRear(44)
InsertRear(11);
DeleteRear();
InsertRear(55);
display();

Answers

Answered by dreamrob
0

After performing these set of operations, the final list look contains:(11,33,44,55)

  • InsertFront adds a number in front of the list and InsertRear adds a number at the end of the list.
  • DeleteFront deletes a number in front of the list and DeleteRear deletes a number at the end of the list.
  • According to the sequence of the function and resulting dequeue are as follows :
  1. InsertFront(11);  ⇒  11
  2. InsertFront(22); ⇒  22,11
  3. InsertRear(33);  ⇒   22,11,33
  4. DeleteFront();    ⇒   11,33
  5. InsertRear(44);   ⇒   11,33,44
  6. InsertRear(11);     ⇒  11,33,44,11
  7. DeleteRear();     ⇒   11,33,44
  8. InsertRear(55);   ⇒  11,33,44,55
  9. display();             ⇒  11,33,44,55

#SPJ3

Similar questions