-
Notifications
You must be signed in to change notification settings - Fork 49
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
base: master
Are you sure you want to change the base?
Leaves - Bri #31
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
No description provided.