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

Savannah #20

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

Savannah #20

wants to merge 18 commits into from

Conversation

qqdipps
Copy link

@qqdipps qqdipps commented Aug 26, 2019

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.

Excellent work, you hit all the learning goals here! Well done! Check out my comments and let me know if you have any questions.

@@ -14,136 +14,284 @@ def initialize(value, next_node = nil)
class LinkedList
def initialize
@head = nil # keep the head private. Not accessible outside this class
@tail = nil

Choose a reason for hiding this comment

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

Smart!


# method to return a string of all the values in the linked list
# Time Complexity: O(n) where n is the number of nodes
# Space Complexity: O(1)

Choose a reason for hiding this comment

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

Since you're building a string of equal size to the list, you have a space complexity of O(n)

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