We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 026d174 commit cbb2b2bCopy full SHA for cbb2b2b
2021/ruby/day05.rb
@@ -9,6 +9,9 @@ def initialize(data=nil)
9
@data = data || input
10
end
11
12
+ # @example
13
+ # new(EXAMPLE_INPUT).part1 #=> 5
14
+ #
15
def part1
16
parse
17
.map{ |line| to_vent_line(line) }
@@ -18,6 +21,9 @@ def part1
18
21
.length
19
22
20
23
24
25
+ # new(EXAMPLE_INPUT).part2 #=> 12
26
27
def part2
28
29
.map{ |line| to_vent_line(line, skip_diagonals: false) }
0 commit comments