File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,34 @@ Add your answers to the questions below.
22
331 . What is the runtime complexity of your ring buffer's ` append ` method?
44
5+ O(1)
6+
572 . What is the space complexity of your ring buffer's ` append ` function?
68
9+ O(1)
10+
7113 . What is the runtime complexity of your ring buffer's ` get ` method?
812
13+ O(n)
14+
9154 . What is the space complexity of your ring buffer's ` get ` method?
1016
17+ O(n)
1118
12195 . What is the runtime complexity of the provided code in ` names.py ` ?
1320
21+ O(n)
22+
14236 . What is the space complexity of the provided code in ` names.py ` ?
1524
25+ O(2n)
26+
16277 . What is the runtime complexity of your optimized code in ` names.py ` ?
1728
29+ O(logn)
30+
18318 . What is the space complexity of your optimized code in ` names.py ` ?
32+
33+ Not sure if this counts as O(n) or O(2n). Having the two lists is a bit
34+ confusing. Final answer, O(2n)
35+
You can’t perform that action at this time.
0 commit comments