After performing following set of operations, what does the final list look contain?
After performing following set of operations, what does the final list look contain?
InsertFront(10);
InsertFront(20);
InsertRear(30);
DeleteFront( );
InsertRear(40);
InsertRear(10);
DeleteRear( );
InsertRear(15);
display( );
Show answerHide answer
Correct answer: (C) 10 30 40 15
Explanation
After the steps the deque is: 10; 20 10; 20 10 30; 10 30; 10 30 40; 10 30 40 10; 10 30 40; then 10 30 40 15.