Skip to content

Conversation

@seaweeddol
Copy link

No description provided.

Copy link

@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.

Well done, you hit the requirements. Nice work.

Comment on lines +22 to 24
# 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)

Choose a reason for hiding this comment

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

👍

Comment on lines +40 to 42
# Time Complexity: O(n), n being up to the length of the linked list
# Space Complexity: O(1)
def search(value)

Choose a reason for hiding this comment

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

👍

Comment on lines +60 to 62
# Time Complexity: O(n), n being up to the length of the linked list
# Space Complexity: O(1)
def find_max

Choose a reason for hiding this comment

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

👍

Comment on lines +79 to 81
# Time Complexity: O(n), n being up to the length of the linked list
# Space Complexity: O(1)
def find_min

Choose a reason for hiding this comment

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

👍

Comment on lines +98 to 100
# Time Complexity: O(n), n being the length of the linked list
# Space Complexity: O(1)
def length

Choose a reason for hiding this comment

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

👍

Comment on lines +116 to 118
# Time Complexity: O(n), n being the index to get the value at
# Space Complexity: O(1)
def get_at_index(index)

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

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.

Comment on lines +147 to 149
# Time Complexity: O(n), n being up to the the amount of nodes in the list
# Space Complexity: O(1)
def delete(value)

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.

Comment on lines +182 to 184
# Time Complexity: O(n), n being the number of nodes in the list
# Space Complexity: O(1)
def reverse

Choose a reason for hiding this comment

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

👍

Comment on lines 232 to 234
# Time Complexity: ?
# Space Complexity: ?
def get_first

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