-
Notifications
You must be signed in to change notification settings - Fork 48
Space - Jessica #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Space - Jessica #24
Conversation
CheezItMan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done, you hit the requirements. Nice work.
| # Time Complexity: O(1), since it will always have direct access to the front of the list | ||
| # Space Complexity: O(1) | ||
| def add_first(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| # Time Complexity: O(n), n being up to the length of the linked list | ||
| # Space Complexity: O(1) | ||
| def search(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| # Time Complexity: O(n), n being up to the length of the linked list | ||
| # Space Complexity: O(1) | ||
| def find_max |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| # Time Complexity: O(n), n being up to the length of the linked list | ||
| # Space Complexity: O(1) | ||
| def find_min |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| # Time Complexity: O(n), n being the length of the linked list | ||
| # Space Complexity: O(1) | ||
| def length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| # Time Complexity: O(n), n being the index to get the value at | ||
| # Space Complexity: O(1) | ||
| def get_at_index(index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| # Space Complexity: ? | ||
| # Time Complexity: O(n), n being the amount of nodes | ||
| # Space Complexity: O(1) | ||
| def visit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠ it's not printing anything.
| # Time Complexity: O(n), n being up to the the amount of nodes in the list | ||
| # Space Complexity: O(1) | ||
| def delete(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little overly complicated, but it works.
| # Time Complexity: O(n), n being the number of nodes in the list | ||
| # Space Complexity: O(1) | ||
| def reverse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| # Time Complexity: ? | ||
| # Space Complexity: ? | ||
| def get_first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.