Conversation
CheezItMan
left a comment
There was a problem hiding this comment.
Nice work Charlotte, you hit the requirements here. Well done.
| # Time Complexity: 0(1) | ||
| # Space Complexity: 0(1) | ||
|
|
||
| def add_first(value) |
| # Time Complexity:0(n) with n being the length of the list | ||
| # Space Complexity:0(n) | ||
| def search(value) |
There was a problem hiding this comment.
👍 , but the space complexity is O(1) as you're not creating a new list here.
| # method to return the max value in the linked list | ||
| # returns the data value and not the node | ||
| def find_max |
| # Time Complexity: 0(n) with n being the length of the list | ||
| # Space Complexity: 0(n) | ||
| def find_min |
There was a problem hiding this comment.
👍 , but the space complexity is O(1) as you're not creating a new list here.
| # Time Complexity: 0(n) with n being the length | ||
| # Space Complexity: 0(n) | ||
| def length |
There was a problem hiding this comment.
👍 , but the space complexity is O(1) as you're not creating a new list here.
| # Time Complexity: 0(n) with n being the length of the list | ||
| # Space Complexity: 0(n) | ||
| def get_at_index(index) |
There was a problem hiding this comment.
👍 , but the space complexity is O(1) as you're not creating a new list here.
| # Time Complexity: 0(n) with n being the length of the list | ||
| # Space Complexity: 0(n) | ||
| def visit |
There was a problem hiding this comment.
👍 , but the space complexity is O(1) as you're not creating a new list here.
| # Time Complexity: 0(n) n being the length of the list | ||
| # Space Complexity: 0(n) | ||
| def reverse |
There was a problem hiding this comment.
👍 , but the space complexity is O(1) as you're not creating a new list here.
No description provided.