subject

A deque is a data structure consisting of a list of items, on which the following operations are possible: push(x): insert item x on the front end of the queue.
pop(): remove the front item from the deque and return it.
inject(x): insert item x on the rear end of the queue.
eject(): remove the rear item from the deque and return it.
getFront(): returns the element at the front of the deque.
getRear(): returns the element at the rear of the deque.

Write routines to support the deque that take O(1) time per operation. Use an array-based implementation. Write a tester class and name it Main.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
Column a of irma’s spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
question
Computers and Technology, 24.06.2019 00:00
Which tool could be used to display only rows containing presidents who served two terms
Answers: 3
You know the right answer?
A deque is a data structure consisting of a list of items, on which the following operations are pos...
Questions
Questions on the website: 13722362