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

Ports - Amy M #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Ports - Amy M #32

wants to merge 1 commit into from

Conversation

amyesh
Copy link

@amyesh amyesh commented Aug 31, 2019

No description provided.

@amyesh amyesh changed the title complete all methods with tests passing Ports - Amy M Sep 1, 2019
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! You hit the learning goals here. The only thing of note is some of your space complexity answers.

# method to find if the linked list contains a node with specified value
# returns true if found, false otherwise
# Time Complexity: O(n)
# Space Complexity: O(n)

Choose a reason for hiding this comment

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

Why a space complexity of n? You're not creating a new list in this method.

raise NotImplementedError
# method to print all the values in the linked list
# Time Complexity: O(n)
# Space Complexity: O(n)

Choose a reason for hiding this comment

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

Again why O(n) space 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