File tree Expand file tree Collapse file tree 1 file changed +29
-8
lines changed Expand file tree Collapse file tree 1 file changed +29
-8
lines changed Original file line number Diff line number Diff line change 1+ from doubly_linked_list import DoublyLinkedList
2+
3+
14class RingBuffer :
2- def __init__ (self , capacity ):
3- self .capacity = capacity
4- self .current = 0
5- self .storage = [None ]* capacity
5+ def __init__ (self , capacity ):
6+ self .capacity = capacity
7+ self .current = None
8+ self .storage = DoublyLinkedList ()
9+
10+ def append (self , item ):
11+ pass
12+
13+ def get (self ):
14+ # Note: This is the only [] allowed
15+ list_buffer_contents = []
16+
17+ # TODO: Your code here
18+
19+ return list_buffer_contents
20+
21+ # ----------------Stretch Goal-------------------
22+
23+
24+ class ArrayRingBuffer :
25+ def __init__ (self , capacity ):
26+ pass
627
7- def append (self , item ):
8- pass
28+ def append (self , item ):
29+ pass
930
10- def get (self ):
11- pass
31+ def get (self ):
32+ pass
You can’t perform that action at this time.
0 commit comments