Gloria#52
Open
CheezItMan wants to merge 3 commits intoAda-C15:masterfrom
Open
Conversation
CheezItMan
commented
Dec 11, 2021
Author
CheezItMan
left a comment
There was a problem hiding this comment.
Overall nice work, you hit the main learning goals here. Well done.
Comment on lines
+13
to
+16
| self.head = None #keep the head private.Not accessible outside class | ||
| self.len = 0 | ||
| self.tail = None | ||
| self.max = 0 |
Author
There was a problem hiding this comment.
You're not actually using the tail etc
Comment on lines
24
to
26
| # Time Complexity: ? | ||
| # Space Complexity: ? | ||
| def get_first(self): |
Comment on lines
35
to
37
| # Time Complexity: ? | ||
| # Space Complexity: ? | ||
| def add_first(self, value): |
| # next_node = self.head | ||
| self.head = Node(value, next_node = self.head) | ||
| self.len += 1 | ||
| self.update_max(value) |
Comment on lines
46
to
48
| # Time Complexity: ? | ||
| # Space Complexity: ? | ||
| def search(self, value): |
Comment on lines
+79
to
+80
|
|
||
| if counter == index: |
Author
There was a problem hiding this comment.
Suggested change
| if counter == index: | |
| if counter == index: | |
Comment on lines
88
to
90
| # Time Complexity: ? | ||
| # Space Complexity: ? | ||
| def get_last(self): |
Comment on lines
+103
to
+107
| if self.len == 0: | ||
| self.tail = Node(value, next_node = None) | ||
| self.head = self.tail | ||
| self.update_max(value) | ||
|
|
Author
There was a problem hiding this comment.
You only really use tail here, but you would potentially need to update it in add_first and remove_first etc.
| @@ -89,7 +163,24 @@ def visit(self): | |||
| # Time Complexity: ? | |||
| # Space Complexity: ? | |||
| def reverse(self): | |||
Comment on lines
128
to
130
| # Time Complexity: ? | ||
| # Space Complexity: ? | ||
| def delete(self, value): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gloria,
You didn't actually make a PR instead you sent in a link to the screen before submitting the PR...