Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
answered questions in answers.md file
  • Loading branch information
ModestoT committed May 10, 2019
commit 6e4c266c5e15c8697a52614e9e35d95145cb9076
15 changes: 8 additions & 7 deletions Data_Structures_Answers.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
Add your answers to the questions below.

1. What is the runtime complexity of your ring buffer's `append` method?

O(c)
2. What is the space complexity of your ring buffer's `append` function?

O(c)
3. What is the runtime complexity of your ring buffer's `get` method?

O(n)
4. What is the space complexity of your ring buffer's `get` method?

O(n)

5. What is the runtime complexity of the provided code in `names.py`?

O(n^2)
6. What is the space complexity of the provided code in `names.py`?

O(n)
7. What is the runtime complexity of your optimized code in `names.py`?

O(logn)
8. What is the space complexity of your optimized code in `names.py`?
O(n)