Skip to content

Leaves - Bri #31

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

Leaves - Bri #31

wants to merge 2 commits into from

Conversation

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

The first method does successfully count the number of unique elements in a sorted list. The second, well it looks like you haven't finished it yet.

I'd adjusted the 1st method requirements, but I see how you got the solution you arrived it.

Overall not bad. Take a look at my comments and let me know what questions you have.

# Time Complexity: ?
# Space Complexity: ?
# Time Complexity: O(n)
# Space Complexity: O(1)
def remove_duplicates(list)

Choose a reason for hiding this comment

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

I think you should have run the tests here.

raise NotImplementedError, "Not implemented yet"
prefix_string = ""
strings.first.length.times do |index|
string.each do |string|

Choose a reason for hiding this comment

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

String is undefined here.

# Space Complexity: ?
# Did not have time to complete all the way

# Time Complexity: O(n^2)

Choose a reason for hiding this comment

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

Given what you have here I would say O(m * n) where m is the length of the 1st string and n is the number of strings.

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