-
Notifications
You must be signed in to change notification settings - Fork 49
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
Branches - Brianna K #29
base: master
Are you sure you want to change the base?
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.
Not bad. See my notes on remove_duplicates
, as it has troubles. Take a look at my comments and let me know if I can clarify things further.
def remove_duplicates(list) | ||
raise NotImplementedError, "Not implemented yet" | ||
(list.length - 1).times do |count| |
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.
This will miss the times when the number appears 3 times in a row
For example:
[1, 2, 2, 3, 4]
end | ||
end | ||
|
||
(list.length - 1).times do |number| |
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 like how this shifts nil
to the right. However it misses the problem listed above.
I went ahead and added a test for C13 on this.
|
||
strings.each do |word| | ||
match = '' | ||
initial_match.length.times do |letter| |
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.
These two loops seem to do the roughly same thing.
No description provided.