Skip to content
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

Space - Charlotte - Linked List #34

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

charlottea13
Copy link

No description provided.

@charlottea13 charlottea13 changed the title Linked list Space - Charlotte - Linked List Aug 25, 2020
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 Charlotte, you hit the requirements here. Well done.

Comment on lines +21 to +24
# 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 +35 to 37
# Time Complexity:0(n) with n being the length of the list
# Space Complexity:0(n)
def search(value)

Choose a reason for hiding this comment

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

👍 , but the space complexity is O(1) as you're not creating a new list here.

Comment on lines 50 to 52
# method to return the max value in the linked list
# returns the data value and not the node
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 +68 to 70
# Time Complexity: 0(n) with n being the length of the list
# Space Complexity: 0(n)
def find_min

Choose a reason for hiding this comment

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

👍 , but the space complexity is O(1) as you're not creating a new list here.

Comment on lines +86 to 88
# Time Complexity: 0(n) with n being the length
# Space Complexity: 0(n)
def length

Choose a reason for hiding this comment

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

👍 , but the space complexity is O(1) as you're not creating a new list here.

Comment on lines +104 to 106
# Time Complexity: 0(n) with n being the length of the list
# Space Complexity: 0(n)
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 the space complexity is O(1) as you're not creating a new list here.

Comment on lines +117 to 119
# Time Complexity: 0(n) with n being the length of the list
# Space Complexity: 0(n)
def visit

Choose a reason for hiding this comment

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

👍 , but the space complexity is O(1) as you're not creating a new list here.

Comment on lines +153 to 155
# Time Complexity: 0(n) n being the length of the list
# Space Complexity: 0(n)
def reverse

Choose a reason for hiding this comment

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

👍 , but the space complexity is O(1) as you're not creating a new list here.

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