Skip to content

Scissors - Araceli #61

Open
aracelim1234 wants to merge 1 commit intoAda-C15:masterfrom
aracelim1234:master
Open

Scissors - Araceli #61
aracelim1234 wants to merge 1 commit intoAda-C15:masterfrom
aracelim1234:master

Conversation

@aracelim1234
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Araceli, you hit the learning goals here. I had some minor feedback. Let me know if you have any questions.

Comment on lines +19 to 21
# Time Complexity: O(1)
# Space Complexity: O(1)
def get_first(self):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +29 to 31
# Time Complexity: O(n)
# Space Complexity: O(1)
def add_first(self, value):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Time complexity is O(1)

Comment on lines +32 to +36
node = Node(value)
node.next = self.head
self.head = node

return node
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
node = Node(value)
node.next = self.head
self.head = node
return node
self.head = Node(value, self.head)
return self.head

Comment on lines 40 to 42
# Time Complexity: ?
# Space Complexity: ?
def search(self, value):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Time/space complexity?

Comment on lines 52 to 54
# Time Complexity: ?
# Space Complexity: ?
def length(self):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Time/space complexity?

Comment on lines +89 to 91
# Time Complexity: O(n)
# Space Complexity: O(1)
def get_last(self):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +103 to 105
# Time Complexity: O(n)
# Space Complexity: O(n)
def add_last(self, value):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +121 to 123
# Time Complexity: O(n)
# Space Complexity: O(1)
def find_max(self):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +141 to 143
# Time Complexity: O(n)
# Space Complexity: O(1)
def delete(self, value):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +173 to 175
# Time Complexity: O(n)
# Space Complexity: O(1)
def reverse(self):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants