Skip to content

Linked List project finished passing 27 tests#60

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

Linked List project finished passing 27 tests#60
ktiktok96 wants to merge 1 commit intoAda-C15:masterfrom
ktiktok96:master

Conversation

@ktiktok96
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 Karla, thanks for getting this in. If you can in future submissions try to answer the time/space complexity questions.

Comment on lines 17 to 21
# returns the value in the first node
# returns None if the list is empty
# Time Complexity: ?
# Space Complexity: ?
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.

👍 Time/space complexity?

Comment on lines 31 to 33
# Time Complexity: ?
# Space Complexity: ?
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/space complexity?

Comment on lines 41 to 43
# 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 53 to 55
# 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 67 to 69
# Time Complexity: ?
# Space Complexity: ?
def get_at_index(self, index):
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 95 to 97
# Time Complexity: ?
# Space Complexity: ?
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.

👍 Time/space complexity?


# method to return the max value in the linked list
# returns the data value and not the node
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.

👍

self.head = self.head.next
return
while current != None:
next = current
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe previous would be a better variable name?

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

👍 Time/space complexity?

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

👍 Time/space complexity?

@ktiktok96
Copy link
Copy Markdown
Author

ktiktok96 commented Jan 21, 2022 via email

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