https://github.com/zerowidth/advent
Advent of Code solutions
https://github.com/zerowidth/advent
Last synced: 10 months ago
JSON representation
Advent of Code solutions
- Host: GitHub
- URL: https://github.com/zerowidth/advent
- Owner: zerowidth
- Created: 2017-12-03T04:31:32.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-12-17T04:01:49.000Z (over 3 years ago)
- Last Synced: 2024-10-28T20:52:10.738Z (over 1 year ago)
- Language: Ruby
- Size: 733 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code
Solutions for https://adventofcode.com.
## Template
```ruby
require_relative "../toolkit"
def solution(input)
result = input.lines.map do |line|
# ...
end
block_given? ? yield(result) : result
end
example = <<-EX
EX
part 1
with(:solution)
try example, 0
try puzzle_input
# part 2
# with(:solution)
# try example, 0
# try puzzle_input
```