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

Sockets - Erica #23

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

Sockets - Erica #23

wants to merge 2 commits into from

Conversation

norrise120
Copy link

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.

Nicely done, you hit the major learning goals here. Take a look at my comments and let me know if you have any questions.

# Time Complexity:
# Space Complexity
# Time Complexity: O(n), where n is the length of the list
# Space Complexity: ?? I'm not sure if puts counts as using memory. If it does, then O(n), where n is the length of the list. Otherwise O(1)

Choose a reason for hiding this comment

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

It doesn't, the output goes to the screen and is forgotten.

def find_middle_value
raise NotImplementedError
return self.get_at_index(self.length / 2)

Choose a reason for hiding this comment

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

smart!

def find_nth_from_end(n)
raise NotImplementedError
largest_index = self.length - 1

Choose a reason for hiding this comment

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

Why not use get_at_index again?

def insert_ascending(value)
raise NotImplementedError
add_first(value) if @head == nil

Choose a reason for hiding this comment

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

This doesn't look right, you would end up inserting value into the list multiple times.

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