You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
596 B
18 lines
596 B
|
|
Exercise 3.23: A
|
|
deque (“double-ended
|
|
queue”) is a sequence in which items can be inserted and deleted at either the
|
|
front or the rear. Operations on deques are the constructor make-deque,
|
|
the predicate empty-deque?, selectors front-deque and
|
|
rear-deque, and mutators front-insert-deque!,
|
|
rear-insert-deque!, front-delete-deque!,
|
|
rear-delete-deque!. Show how to represent deques using pairs, and give
|
|
implementations of the operations.151
|
|
All operations should be accomplished in
|
|
|
|
Θ
|
|
(
|
|
1
|
|
)
|
|
|
|
steps.
|
|
|