Skip to content

wave 2 finished #28

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

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

wave 2 finished #28

wants to merge 2 commits into from

Conversation

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

There are some issues here. Check out my comments on the 1st method (remove duplicates). There are circumstances it won't work.

It looks like you're still working through the second method.

# Time Complexity: ?
# Space Complexity: ?
require "pry"
# Time Complexity: O(n2) because it is a nested loop. Each loop runs n number of times where n is the

Choose a reason for hiding this comment

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

Correct!

c = 0

while list[c] != nil
while list[c] == list[i]

Choose a reason for hiding this comment

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

This is a little odd and I think you could have i go beyond the bounds of the array. Something could break here.

@CheezItMan
Copy link

Oh and in the future can you put your 1st name in the PR?

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