Skip to content

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