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

Spruce-C16 | Zandra | LinkedList #10

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

Conversation

zandra2
Copy link

@zandra2 zandra2 commented Apr 5, 2022

No description provided.

Copy link
Contributor

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

One note, please make PRs against the Ada-C16 remote repo.

Nice work Zandra, you hit the required methods. Well done. I left a few minor comments, but this is a nice submission.

Comment on lines +18 to 21
# Time Complexity: (O)1?
# Space Complexity: O(1)?

def get_first(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Comment on lines +29 to 32
# Time Complexity: (O)1?
# Space Complexity: O(1)?

def add_first(self, value):
Copy link
Contributor

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 43
# Time Complexity: O(n)?
# Space Complexity: O(1)?

def search(self, value):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Comment on lines +58 to 61
# Time Complexity: O(n)?
# Space Complexity: O(1)?

def length(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Comment on lines +75 to 78
# Time Complexity: O(n)?
# Space Complexity: O(1)?

def get_at_index(self, index):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Comment on lines +113 to 116
# Time Complexity: O(n)?
# Space Complexity: O(n)?

def add_last(self, value):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 However the space complexity here is O(1)


# method to return the max value in the linked list
# returns the data value and not the node

def find_max(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Comment on lines +152 to 154
# Time Complexity: O(n)?
# Space Complexity: O(1)?
def delete(self, value):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Comment on lines +173 to 176
# Time Complexity: O(n)?
# Space Complexity: O(n)?

def visit(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Comment on lines +188 to 191
# Time Complexity: O(n) ?
# Space Complexity: O(1)?

def reverse(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 However think about better variable names than p1 and p2

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