-
Notifications
You must be signed in to change notification settings - Fork 66
Maria M. - Scissors #38
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?
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.
Nice work Maria, you hit the learning goals here. Well done. I left a few minor comments. Let me know what questions you have.
| # Time Complexity: O(1) | ||
| # Space Complexity: O(1) | ||
| def get_first(self): |
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) | ||
| # Space Complexity: O(1) | ||
| def search(self, 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) | ||
| # Space Complexity: O(1) | ||
| def length(self): |
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) | ||
| # Space Complexity: O(1) | ||
| def get_at_index(self, 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.
👍
| # Time Complexity: ? | ||
| # Space Complexity: ? | ||
| def get_last(self): |
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/space complexity?
| # Time Complexity: O(n) | ||
| # Space Complexity: O(1) | ||
| def delete(self, 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.
👍 , I do want to point out that this implementation is deleting all instances of value in the list. Not wrong, just an implementation choice.
| # Time Complexity: O(n) | ||
| # Space Complexity: O(1) | ||
| def visit(self): |
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.
👍 , but the space complexity here is O(n) because it builds a list
| # Time Complexity: O(n) | ||
| # Space Complexity: O(1) | ||
| def reverse(self): |
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 find_middle_value(self): |
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.
👍 Good reuse of existing methods
| # Time Complexity: ? | ||
| # Space Complexity: ? | ||
| def find_nth_from_end(self, n): |
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.
👍 Good use of arithmetic and length, but what about the time/space complexity?
No description provided.