Skip to content

Rock - BRITTANY #53

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

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

Rock - BRITTANY #53

wants to merge 5 commits into from

Conversation

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

Nice work Brittany, you hit the learning goals here. well done.

Comment on lines +18 to 20
# Time Complexity: O(n)
# Space Complexity: O(1)
def get_first(self):

Choose a reason for hiding this comment

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

👍 Time & space complexities are O(1)

Comment on lines +28 to 30
# Time Complexity: O(1)
# Space Complexity: O(n)
def add_first(self, value):

Choose a reason for hiding this comment

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

👍 , Space complexity is O(1)

Comment on lines +37 to 39
# Time Complexity: O(n)
# Space Complexity: o(1)
def search(self, value):

Choose a reason for hiding this comment

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

👍

Comment on lines 48 to 50
# Time Complexity: ?
# Space Complexity: ?
def length(self):

Choose a reason for hiding this comment

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

👍 space/time complexity?

Comment on lines 61 to 63
# Time Complexity: ?
# Space Complexity: ?
def get_at_index(self, index):

Choose a reason for hiding this comment

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

👍 space/time complexity?

Comment on lines 77 to 79
# Time Complexity: ?
# Space Complexity: ?
def get_last(self):

Choose a reason for hiding this comment

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

👍 space/time complexity?

Comment on lines +88 to 90
# Time Complexity: O (n)
# Space Complexity: O(1)
def add_last(self, value):

Choose a reason for hiding this comment

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

👍 space/time complexity?

else:
while current.next != None:
current = current.next
current.next = new_last_item

# method to return the max value in the linked list
# returns the data value and not the node
def find_max(self):

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)
# Space Complexity: O(1)
def delete(self, value):

Choose a reason for hiding this comment

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

👍 space/time complexity?

Comment on lines 149 to 151
# Time Complexity: ?
# Space Complexity: ?
def reverse(self):

Choose a reason for hiding this comment

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

👍 space/time complexity?

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