Using python list , Stack ADT "peek()"
is implemented using [len (self.item) +1]
is implemented using [len (self.item) +1]
Anonymous Quiz
20%
T
80%
F
Using python list , Stack ADT "size()" is implemented using " len (self.item) "
Anonymous Quiz
90%
T
10%
F
Deque is a hybrid linear structure, so it requires the LIFO and FIFO ordering.
Anonymous Quiz
43%
T
57%
F
in Queue is_empty() : tests to see whether the queue is empty. It needs no parameters and returns the item.
Anonymous Quiz
46%
T
54%
F
enqueue(item) adds a new item to the rear of the queue. It needs the item and returns nothing.
Anonymous Quiz
83%
T
17%
F
Using python list , Queue ADT "enqueue()" is implemented using pop (0 , item)
Anonymous Quiz
20%
T
80%
F
Using python list , Queue ADT "size()" is implemented using len (self.item - 1 )
Anonymous Quiz
32%
T
68%
F
Deque : New items can be added at either the front or the rear.Likewise, existing items can't be removed from either end
Anonymous Quiz
28%
T
72%
F
add_front(item) adds a new item to the front of the deque. It needs the item and returns item.
Anonymous Quiz
34%
T
66%
F
size() returns the number of items in the deque. It needs no parameters and returns an integer
Anonymous Quiz
92%
T
8%
F
add_rear(item) adds a new item to the front of the deque. It needs the item and returns nothing.
Anonymous Quiz
21%
T
79%
F
remove_front() removes the front item from the deque. It needs parameters and returns the item
Anonymous Quiz
39%
T
61%
F