-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added day 9 solved in ruby #24
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.
The algorithm is quite similar to mine 💯
end | ||
return score | ||
end | ||
end |
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.
Wow, big file here. I would recommend you to separate and reuse code. Follow the DRY principle 😉
end | ||
numofgroups = 0 | ||
groups_open = 0 | ||
novalid = 0 |
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 can see you are using novalid
as a boolean. Using int flags can be quite tough to read.
numofgroups = 0 | ||
groups_open = 0 | ||
novalid = 0 | ||
garbage_open = 0 |
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.
Same here.
return score | ||
end | ||
|
||
end |
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.
Better spacing in this file 👍
Duxy's solution for day 9 challenge
Description
Solution
Tests battery
I use the engine of ruby. This tests were very useful, I recommend to see them.
Happy Advent of Code!