forked from HU-CS201-master/hw01-spring-18
-
Notifications
You must be signed in to change notification settings - Fork 4
/
min_dq.py
42 lines (34 loc) · 896 Bytes
/
min_dq.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class MinDeque:
'''As described in Exercise 3.16.'''
def __init__():
pass
def __str__(self):
'''Returns a string representation of an object for printing.
'''
pass
def add_first(self, x):
'''Adds x at the front.
'''
pass
def add_last(self, x):
'''Adds x at the back.
'''
pass
def remove_first(self):
'''Removes the element at the front and returns it. Returns None
if dq is empty.
'''
pass
def remove_last(self):
'''Removes the element at the back and returns it. Returns None
if dq is empty.
'''
pass
def size(self):
'''Returns the number of elements currently in the dq.
'''
pass
def min(self):
'''Returns the smallest element currently in the dq.
'''
pass