Skip to content

Conversation

@anakp07
Copy link

@anakp07 anakp07 commented Mar 31, 2021

Finished the assignment.

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.

Nice work Ana, you hit the main learning goals, but you didn't answer all the space/time complexities. Other than that, well done.

Comment on lines +21 to 23
# Time Complexity: 0(1)
# Space Complexity: 0(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 +30 to 32
# Time Complexity: 0(n)
# Space Complexity: 0(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 +47 to 49
# Time Complexity: O(n)
# Space Complexity: O(n)
def find_max

Choose a reason for hiding this comment

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

This works, but the space complexity is O(1).

Comment on lines +68 to 70
# Time Complexity: O(n)
# 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 +89 to 91
# Time Complexity: 0(n)
# Space Complexity: 0(1)
def get_first

Choose a reason for hiding this comment

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

This works, but both the time and space complexity are O(1).

Comment on lines 131 to 133
# Time Complexity: ?
# Space Complexity: ?
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.

👍 , but space/time complexity?

Comment on lines +148 to 150
# Time Complexity: o(n)
# 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.

👍

Comment on lines +160 to 162
# Time Complexity: o(n)
# 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.

👍

Comment on lines +183 to 185
# Time Complexity: o(n)
# 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 +205 to 207
# Time Complexity: o(n)
# Space Complexity: o(1)
def get_last

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