advent_of_ruby 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/arb +1 -1
- data/data/solutions/reddit/ruby/2015/02.yml +5 -5
- data/data/solutions/reddit/ruby/2015/03.yml +6 -6
- data/data/solutions/reddit/ruby/2015/04.yml +7 -7
- data/data/solutions/reddit/ruby/2015/05.yml +6 -6
- data/data/solutions/reddit/ruby/2015/06.yml +14 -14
- data/data/solutions/reddit/ruby/2015/07.yml +15 -15
- data/data/solutions/reddit/ruby/2015/08.yml +6 -6
- data/data/solutions/reddit/ruby/2015/09.yml +11 -11
- data/data/solutions/reddit/ruby/2015/10.yml +18 -18
- data/data/solutions/reddit/ruby/2015/11.yml +19 -19
- data/data/solutions/reddit/ruby/2015/12.yml +10 -10
- data/data/solutions/reddit/ruby/2015/13.yml +9 -9
- data/data/solutions/reddit/ruby/2015/14.yml +11 -11
- data/data/solutions/reddit/ruby/2015/15.yml +9 -9
- data/data/solutions/reddit/ruby/2015/16.yml +7 -7
- data/data/solutions/reddit/ruby/2015/17.yml +10 -10
- data/data/solutions/reddit/ruby/2015/18.yml +4 -4
- data/data/solutions/reddit/ruby/2015/19.yml +1 -1
- data/data/solutions/reddit/ruby/2015/20.yml +2 -2
- data/data/solutions/reddit/ruby/2015/21.yml +4 -4
- data/data/solutions/reddit/ruby/2015/22.yml +5 -5
- data/data/solutions/reddit/ruby/2015/23.yml +3 -3
- data/data/solutions/reddit/ruby/2015/24.yml +11 -11
- data/data/solutions/reddit/ruby/2015/25.yml +5 -5
- data/data/solutions/reddit/ruby/2016/01.yml +5 -5
- data/data/solutions/reddit/ruby/2016/02.yml +3 -3
- data/data/solutions/reddit/ruby/2016/03.yml +1 -1
- data/data/solutions/reddit/ruby/2016/04.yml +4 -4
- data/data/solutions/reddit/ruby/2016/05.yml +3 -3
- data/data/solutions/reddit/ruby/2016/06.yml +4 -4
- data/data/solutions/reddit/ruby/2016/07.yml +3 -3
- data/data/solutions/reddit/ruby/2016/08.yml +6 -6
- data/data/solutions/reddit/ruby/2016/09.yml +1 -1
- data/data/solutions/reddit/ruby/2016/10.yml +3 -3
- data/data/solutions/reddit/ruby/2016/11.yml +1 -1
- data/data/solutions/reddit/ruby/2016/12.yml +3 -3
- data/data/solutions/reddit/ruby/2016/14.yml +4 -4
- data/data/solutions/reddit/ruby/2016/15.yml +11 -11
- data/data/solutions/reddit/ruby/2016/16.yml +1 -1
- data/data/solutions/reddit/ruby/2016/17.yml +3 -3
- data/data/solutions/reddit/ruby/2016/18.yml +3 -3
- data/data/solutions/reddit/ruby/2016/20.yml +2 -2
- data/data/solutions/reddit/ruby/2016/21.yml +7 -7
- data/data/solutions/reddit/ruby/2016/22.yml +10 -10
- data/data/solutions/reddit/ruby/2017/01.yml +7 -7
- data/data/solutions/reddit/ruby/2017/02.yml +15 -15
- data/data/solutions/reddit/ruby/2017/03.yml +9 -9
- data/data/solutions/reddit/ruby/2017/04.yml +4 -4
- data/data/solutions/reddit/ruby/2017/05.yml +12 -12
- data/data/solutions/reddit/ruby/2017/06.yml +16 -16
- data/data/solutions/reddit/ruby/2017/07.yml +5 -5
- data/data/solutions/reddit/ruby/2017/08.yml +18 -18
- data/data/solutions/reddit/ruby/2017/09.yml +7 -7
- data/data/solutions/reddit/ruby/2017/10.yml +9 -9
- data/data/solutions/reddit/ruby/2017/11.yml +1 -1
- data/data/solutions/reddit/ruby/2017/12.yml +6 -6
- data/data/solutions/reddit/ruby/2017/13.yml +6 -6
- data/data/solutions/reddit/ruby/2017/14.yml +1 -1
- data/data/solutions/reddit/ruby/2017/15.yml +3 -3
- data/data/solutions/reddit/ruby/2017/16.yml +5 -5
- data/data/solutions/reddit/ruby/2017/17.yml +6 -6
- data/data/solutions/reddit/ruby/2017/18.yml +7 -7
- data/data/solutions/reddit/ruby/2017/19.yml +2 -2
- data/data/solutions/reddit/ruby/2017/20.yml +5 -5
- data/data/solutions/reddit/ruby/2017/21.yml +11 -11
- data/data/solutions/reddit/ruby/2017/22.yml +1 -1
- data/data/solutions/reddit/ruby/2017/23.yml +1 -1
- data/data/solutions/reddit/ruby/2017/25.yml +3 -3
- data/data/solutions/reddit/ruby/2018/01.yml +20 -20
- data/data/solutions/reddit/ruby/2018/02.yml +16 -16
- data/data/solutions/reddit/ruby/2018/03.yml +12 -12
- data/data/solutions/reddit/ruby/2018/04.yml +6 -6
- data/data/solutions/reddit/ruby/2018/05.yml +15 -15
- data/data/solutions/reddit/ruby/2018/06.yml +4 -4
- data/data/solutions/reddit/ruby/2018/07.yml +11 -11
- data/data/solutions/reddit/ruby/2018/08.yml +9 -9
- data/data/solutions/reddit/ruby/2018/09.yml +13 -13
- data/data/solutions/reddit/ruby/2018/10.yml +10 -10
- data/data/solutions/reddit/ruby/2018/11.yml +9 -9
- data/data/solutions/reddit/ruby/2018/12.yml +2 -2
- data/data/solutions/reddit/ruby/2018/13.yml +14 -14
- data/data/solutions/reddit/ruby/2018/14.yml +5 -5
- data/data/solutions/reddit/ruby/2018/15.yml +2 -2
- data/data/solutions/reddit/ruby/2018/16.yml +7 -7
- data/data/solutions/reddit/ruby/2018/17.yml +1 -1
- data/data/solutions/reddit/ruby/2018/18.yml +6 -6
- data/data/solutions/reddit/ruby/2018/19.yml +1 -1
- data/data/solutions/reddit/ruby/2018/20.yml +1 -1
- data/data/solutions/reddit/ruby/2018/21.yml +4 -4
- data/data/solutions/reddit/ruby/2018/22.yml +3 -3
- data/data/solutions/reddit/ruby/2018/23.yml +11 -11
- data/data/solutions/reddit/ruby/2018/24.yml +4 -4
- data/data/solutions/reddit/ruby/2018/25.yml +6 -6
- data/data/solutions/reddit/ruby/2019/01.yml +11 -11
- data/data/solutions/reddit/ruby/2019/02.yml +13 -13
- data/data/solutions/reddit/ruby/2019/03.yml +7 -7
- data/data/solutions/reddit/ruby/2019/04.yml +11 -11
- data/data/solutions/reddit/ruby/2019/05.yml +10 -10
- data/data/solutions/reddit/ruby/2019/06.yml +7 -7
- data/data/solutions/reddit/ruby/2019/07.yml +8 -8
- data/data/solutions/reddit/ruby/2019/08.yml +8 -8
- data/data/solutions/reddit/ruby/2019/09.yml +4 -4
- data/data/solutions/reddit/ruby/2019/10.yml +4 -4
- data/data/solutions/reddit/ruby/2019/11.yml +7 -7
- data/data/solutions/reddit/ruby/2019/12.yml +17 -17
- data/data/solutions/reddit/ruby/2019/13.yml +6 -6
- data/data/solutions/reddit/ruby/2019/14.yml +2 -2
- data/data/solutions/reddit/ruby/2019/15.yml +3 -3
- data/data/solutions/reddit/ruby/2019/16.yml +6 -6
- data/data/solutions/reddit/ruby/2019/17.yml +3 -3
- data/data/solutions/reddit/ruby/2019/18.yml +1 -1
- data/data/solutions/reddit/ruby/2019/20.yml +9 -9
- data/data/solutions/reddit/ruby/2019/21.yml +3 -3
- data/data/solutions/reddit/ruby/2019/22.yml +3 -3
- data/data/solutions/reddit/ruby/2019/23.yml +1 -1
- data/data/solutions/reddit/ruby/2019/25.yml +2 -2
- data/data/solutions/reddit/ruby/2020/01.yml +30 -30
- data/data/solutions/reddit/ruby/2020/02.yml +25 -25
- data/data/solutions/reddit/ruby/2020/03.yml +17 -17
- data/data/solutions/reddit/ruby/2020/04.yml +26 -26
- data/data/solutions/reddit/ruby/2020/05.yml +35 -35
- data/data/solutions/reddit/ruby/2020/06.yml +40 -40
- data/data/solutions/reddit/ruby/2020/07.yml +16 -16
- data/data/solutions/reddit/ruby/2020/08.yml +13 -13
- data/data/solutions/reddit/ruby/2020/09.yml +21 -21
- data/data/solutions/reddit/ruby/2020/10.yml +29 -29
- data/data/solutions/reddit/ruby/2020/11.yml +8 -8
- data/data/solutions/reddit/ruby/2020/12.yml +22 -22
- data/data/solutions/reddit/ruby/2020/13.yml +15 -15
- data/data/solutions/reddit/ruby/2020/14.yml +11 -11
- data/data/solutions/reddit/ruby/2020/15.yml +9 -9
- data/data/solutions/reddit/ruby/2020/16.yml +13 -13
- data/data/solutions/reddit/ruby/2020/17.yml +11 -11
- data/data/solutions/reddit/ruby/2020/18.yml +19 -19
- data/data/solutions/reddit/ruby/2020/19.yml +18 -18
- data/data/solutions/reddit/ruby/2020/20.yml +4 -4
- data/data/solutions/reddit/ruby/2020/21.yml +4 -4
- data/data/solutions/reddit/ruby/2020/22.yml +8 -8
- data/data/solutions/reddit/ruby/2020/23.yml +4 -4
- data/data/solutions/reddit/ruby/2020/24.yml +6 -6
- data/data/solutions/reddit/ruby/2020/25.yml +6 -6
- data/data/solutions/reddit/ruby/2021/01.yml +74 -74
- data/data/solutions/reddit/ruby/2021/02.yml +45 -45
- data/data/solutions/reddit/ruby/2021/03.yml +43 -43
- data/data/solutions/reddit/ruby/2021/04.yml +23 -23
- data/data/solutions/reddit/ruby/2021/05.yml +16 -16
- data/data/solutions/reddit/ruby/2021/06.yml +35 -35
- data/data/solutions/reddit/ruby/2021/07.yml +26 -26
- data/data/solutions/reddit/ruby/2021/08.yml +15 -15
- data/data/solutions/reddit/ruby/2021/09.yml +11 -11
- data/data/solutions/reddit/ruby/2021/10.yml +9 -9
- data/data/solutions/reddit/ruby/2021/11.yml +12 -12
- data/data/solutions/reddit/ruby/2021/12.yml +8 -8
- data/data/solutions/reddit/ruby/2021/13.yml +13 -13
- data/data/solutions/reddit/ruby/2021/14.yml +10 -10
- data/data/solutions/reddit/ruby/2021/15.yml +10 -10
- data/data/solutions/reddit/ruby/2021/16.yml +8 -8
- data/data/solutions/reddit/ruby/2021/17.yml +6 -6
- data/data/solutions/reddit/ruby/2021/18.yml +5 -5
- data/data/solutions/reddit/ruby/2021/19.yml +3 -3
- data/data/solutions/reddit/ruby/2021/20.yml +5 -5
- data/data/solutions/reddit/ruby/2021/21.yml +5 -5
- data/data/solutions/reddit/ruby/2021/22.yml +4 -4
- data/data/solutions/reddit/ruby/2021/23.yml +7 -7
- data/data/solutions/reddit/ruby/2021/24.yml +8 -8
- data/data/solutions/reddit/ruby/2021/25.yml +4 -4
- data/data/solutions/reddit/ruby/2022/01.yml +29 -29
- data/data/solutions/reddit/ruby/2022/02.yml +21 -21
- data/data/solutions/reddit/ruby/2022/03.yml +35 -35
- data/data/solutions/reddit/ruby/2022/04.yml +42 -42
- data/data/solutions/reddit/ruby/2022/05.yml +29 -29
- data/data/solutions/reddit/ruby/2022/06.yml +38 -38
- data/data/solutions/reddit/ruby/2022/07.yml +25 -25
- data/data/solutions/reddit/ruby/2022/08.yml +9 -9
- data/data/solutions/reddit/ruby/2022/09.yml +18 -18
- data/data/solutions/reddit/ruby/2022/10.yml +14 -14
- data/data/solutions/reddit/ruby/2022/11.yml +7 -7
- data/data/solutions/reddit/ruby/2022/12.yml +2 -2
- data/data/solutions/reddit/ruby/2022/13.yml +9 -9
- data/data/solutions/reddit/ruby/2022/14.yml +5 -5
- data/data/solutions/reddit/ruby/2022/15.yml +6 -6
- data/data/solutions/reddit/ruby/2022/16.yml +5 -5
- data/data/solutions/reddit/ruby/2022/17.yml +2 -2
- data/data/solutions/reddit/ruby/2022/18.yml +6 -6
- data/data/solutions/reddit/ruby/2022/19.yml +3 -3
- data/data/solutions/reddit/ruby/2022/20.yml +12 -12
- data/data/solutions/reddit/ruby/2022/21.yml +11 -11
- data/data/solutions/reddit/ruby/2022/22.yml +4 -4
- data/data/solutions/reddit/ruby/2022/24.yml +10 -10
- data/data/solutions/reddit/ruby/2022/25.yml +10 -10
- data/data/solutions/reddit/ruby/2023/01.yml +52 -52
- data/data/solutions/reddit/ruby/2023/02.yml +21 -21
- data/data/solutions/reddit/ruby/2023/03.yml +18 -18
- data/data/solutions/reddit/ruby/2023/04.yml +31 -31
- data/data/solutions/reddit/ruby/2023/05.yml +14 -14
- data/data/solutions/reddit/ruby/2023/06.yml +24 -24
- data/data/solutions/reddit/ruby/2023/07.yml +32 -32
- data/data/solutions/reddit/ruby/2023/08.yml +20 -20
- data/data/solutions/reddit/ruby/2023/09.yml +32 -32
- data/data/solutions/reddit/ruby/2023/10.yml +18 -18
- data/data/solutions/reddit/ruby/2023/11.yml +16 -16
- data/data/solutions/reddit/ruby/2023/12.yml +5 -5
- data/data/solutions/reddit/ruby/2023/13.yml +6 -6
- data/data/solutions/reddit/ruby/2023/14.yml +14 -14
- data/data/solutions/reddit/ruby/2023/15.yml +13 -13
- data/data/solutions/reddit/ruby/2023/16.yml +8 -8
- data/data/solutions/reddit/ruby/2023/18.yml +5 -5
- data/data/solutions/reddit/ruby/2023/19.yml +6 -6
- data/data/solutions/reddit/ruby/2023/20.yml +9 -9
- data/data/solutions/reddit/ruby/2023/21.yml +5 -5
- data/data/solutions/reddit/ruby/2023/22.yml +2 -2
- data/data/solutions/reddit/ruby/2023/23.yml +1 -1
- data/data/solutions/reddit/ruby/2023/25.yml +1 -1
- data/data/solutions/reddit/ruby/2024/01.yml +15 -15
- data/data/solutions/reddit/ruby/2024/02.yml +17 -17
- data/data/solutions/reddit/ruby/2024/03.yml +43 -43
- data/data/solutions/reddit/ruby/2024/04.yml +18 -18
- data/data/solutions/reddit/ruby/2024/05.yml +29 -29
- data/data/solutions/reddit/ruby/2024/06.yml +19 -19
- data/data/solutions/reddit/ruby/2024/07.yml +26 -26
- data/data/solutions/reddit/ruby/2024/08.yml +15 -15
- data/data/solutions/reddit/ruby/2024/09.yml +5 -5
- data/data/solutions/reddit/ruby/2024/10.yml +9 -9
- data/data/solutions/reddit/ruby/2024/11.yml +15 -15
- data/data/solutions/reddit/ruby/2024/12.yml +9 -9
- data/data/solutions/reddit/ruby/2024/13.yml +10 -10
- data/data/solutions/reddit/ruby/2024/14.yml +6 -6
- data/data/solutions/reddit/ruby/2024/15.yml +5 -5
- data/data/solutions/reddit/ruby/2024/16.yml +4 -4
- data/data/solutions/reddit/ruby/2024/17.yml +11 -11
- data/data/solutions/reddit/ruby/2024/18.yml +9 -9
- data/data/solutions/reddit/ruby/2024/19.yml +16 -16
- data/data/solutions/reddit/ruby/2024/20.yml +8 -8
- data/data/solutions/reddit/ruby/2024/21.yml +3 -3
- data/data/solutions/reddit/ruby/2024/22.yml +8 -8
- data/data/solutions/reddit/ruby/2024/23.yml +13 -13
- data/data/solutions/reddit/ruby/2024/24.yml +7 -7
- data/data/solutions/reddit/ruby/2024/25.yml +14 -14
- data/lib/arb/api/aoc.rb +2 -2
- data/lib/arb/cli/run.rb +2 -3
- data/lib/arb/version.rb +1 -1
- data/lib/download_solutions/api/reddit/get_serial_comments.rb +1 -1
- metadata +2 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: lo-crawfish
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hp7qf8l
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hp7qf8l
|
4
4
|
:body: |-
|
5
5
|
I'm late to the party, but here's my Ruby solution:
|
6
6
|
|
@@ -53,14 +53,14 @@
|
|
53
53
|
```
|
54
54
|
:replies: []
|
55
55
|
- :author: thedjotaku
|
56
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hn0aelt
|
56
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hn0aelt
|
57
57
|
:body: |-
|
58
58
|
My [Ruby solution](https://github.com/djotaku/adventofcode/blob/857a34910ea29720298c3eb4b8d9b5065d6f433b/2021/Day_02/Ruby/solution.rb)
|
59
59
|
|
60
60
|
Today was easy enough that I was able to do Ruby, too! All in one function.
|
61
61
|
:replies: []
|
62
62
|
- :author: Sharparam
|
63
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwc4t3
|
63
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwc4t3
|
64
64
|
:body: |-
|
65
65
|
## **Ruby** (426/627)
|
66
66
|
|
@@ -86,18 +86,18 @@
|
|
86
86
|
```
|
87
87
|
:replies:
|
88
88
|
- :author: '442401'
|
89
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwd562
|
89
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwd562
|
90
90
|
:body: |-
|
91
91
|
Oh, that is nice! Sweet evaling, my friend. +1
|
92
92
|
|
93
93
|
And sweet use of one line methods. +1
|
94
94
|
:replies: []
|
95
95
|
- :author: "[deleted]"
|
96
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwctyv
|
96
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwctyv
|
97
97
|
:body: woah that's clever
|
98
98
|
:replies: []
|
99
99
|
- :author: snowe2010
|
100
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzly8c
|
100
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzly8c
|
101
101
|
:body: |-
|
102
102
|
I golfed your solution down to 115 chars.
|
103
103
|
|
@@ -113,7 +113,7 @@
|
|
113
113
|
the eval is hilariously clever
|
114
114
|
:replies:
|
115
115
|
- :author: Sharparam
|
116
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hn1bdwk
|
116
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hn1bdwk
|
117
117
|
:body: |-
|
118
118
|
Nice one :D
|
119
119
|
|
@@ -122,15 +122,15 @@
|
|
122
122
|
Edit: [2020 day 18](https://github.com/Sharparam/advent-of-code/blob/main/2020/18/solution.rb) was another fun one.
|
123
123
|
:replies:
|
124
124
|
- :author: snowe2010
|
125
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hn1jsjo
|
125
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hn1jsjo
|
126
126
|
:body: That’s awesome. I’ll need to unlearn some good habits to start seeing things that way lol. I need to go back and finish all the years I started and never completed.
|
127
127
|
:replies: []
|
128
128
|
- :author: Chrinkus
|
129
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwg6mk
|
129
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwg6mk
|
130
130
|
:body: LOL 'depth is also aim'! I didn't pick up on that while working it out but something DID bug me about 'aim'. Well done!
|
131
131
|
:replies: []
|
132
132
|
- :author: BluFoot
|
133
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwdm4d
|
133
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwdm4d
|
134
134
|
:body: |-
|
135
135
|
**Ruby 78 bytes.**
|
136
136
|
|
@@ -143,7 +143,7 @@
|
|
143
143
|
```
|
144
144
|
:replies:
|
145
145
|
- :author: '442401'
|
146
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwhtpk
|
146
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwhtpk
|
147
147
|
:body: |-
|
148
148
|
> `n=_1[-2..].to_i`
|
149
149
|
|
@@ -152,11 +152,11 @@
|
|
152
152
|
In that case, can we save a few bytes by `n=_1[-2].to_i` ?
|
153
153
|
:replies:
|
154
154
|
- :author: BluFoot
|
155
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmxzhgx
|
155
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmxzhgx
|
156
156
|
:body: I did that originally, but the last line doesn't have a newline character :( So on every line but the last line, it's [-2], but for the last line it's [-1]. [-2..] works because it simply includes the space before the number in the last line.
|
157
157
|
:replies: []
|
158
158
|
- :author: snowe2010
|
159
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzhmak
|
159
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzhmak
|
160
160
|
:body: |-
|
161
161
|
dang, that's good. Mine was a few characters longer and I assume I've already got the lines as an array.
|
162
162
|
|
@@ -169,11 +169,11 @@
|
|
169
169
|
completely forgot you could multiple assign like that, and not splitting the lines saves you a lot. Glad I came to the same `k[?f]` solution as you though, I thought I was really smart lol.
|
170
170
|
:replies:
|
171
171
|
- :author: BluFoot
|
172
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzszxu
|
172
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzszxu
|
173
173
|
:body: Nice, yours is pretty great too!! Using the ternary operator is a very ugly but effective solution to to save some characters as well :)
|
174
174
|
:replies: []
|
175
175
|
- :author: snowe2010
|
176
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmze5ma
|
176
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmze5ma
|
177
177
|
:body: |-
|
178
178
|
# Ruby
|
179
179
|
|
@@ -226,7 +226,7 @@
|
|
226
226
|
```
|
227
227
|
:replies: []
|
228
228
|
- :author: "[deleted]"
|
229
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmy7i73
|
229
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmy7i73
|
230
230
|
:body: |-
|
231
231
|
Part 2, Awk.
|
232
232
|
|
@@ -243,11 +243,11 @@
|
|
243
243
|
My main solution was Ruby, I just wrote this for fun
|
244
244
|
:replies:
|
245
245
|
- :author: campingD
|
246
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmyamyd
|
246
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmyamyd
|
247
247
|
:body: looks so clean
|
248
248
|
:replies: []
|
249
249
|
- :author: dtinth
|
250
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwa7uc
|
250
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwa7uc
|
251
251
|
:body: |-
|
252
252
|
Ruby, 251 / 155
|
253
253
|
|
@@ -256,7 +256,7 @@
|
|
256
256
|
I got slowed down by duplicate variable names. **Note to self:** Next time, stick with the names given by problem. Don’t shorten `horizontal position` down to `x` because it clashes with the input `x` in the problem, try something like `hpos` instead.
|
257
257
|
:replies: []
|
258
258
|
- :author: gurgeous
|
259
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwa95c
|
259
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwa95c
|
260
260
|
:body: |-
|
261
261
|
**Ruby** , 546/993 (you guys are fast!!)
|
262
262
|
|
@@ -274,60 +274,60 @@
|
|
274
274
|
```
|
275
275
|
:replies:
|
276
276
|
- :author: AbdussamiT
|
277
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwaixp
|
277
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwaixp
|
278
278
|
:body: From where do you see that you ranked 546 and 993 respectively?
|
279
279
|
:replies:
|
280
280
|
- :author: MasterMedo
|
281
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwapci
|
281
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwapci
|
282
282
|
:body: When you submit the solution it tells your rank, but you can also check it on the stats -\> personal stats page :)
|
283
283
|
:replies:
|
284
284
|
- :author: heroBrauni
|
285
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwbdlu
|
285
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwbdlu
|
286
286
|
:body: |-
|
287
287
|
It is under Leaderboard -\> Personal Stats, in case someone else can't find it:
|
288
288
|
|
289
289
|
https://adventofcode.com/2021/leaderboard/self
|
290
290
|
:replies:
|
291
291
|
- :author: AbdussamiT
|
292
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwc0k7
|
292
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwc0k7
|
293
293
|
:body: Found it, thanks! Thanks to you too u/MasterMedo
|
294
294
|
:replies: []
|
295
295
|
- :author: TransdermalHug
|
296
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwaxlb
|
296
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwaxlb
|
297
297
|
:body: It only tells you if you're in the top 1000. Otherwise, you have to look at the personal stats page.
|
298
298
|
:replies: []
|
299
299
|
- :author: "[deleted]"
|
300
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwciod
|
300
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwciod
|
301
301
|
:body: |-
|
302
302
|
## Ruby
|
303
303
|
|
304
304
|
https://github.com/zsarge/advent-of-code-2021/blob/main/solutions/02/solve2.rb
|
305
305
|
:replies:
|
306
306
|
- :author: '442401'
|
307
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwcr3x
|
307
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwcr3x
|
308
308
|
:body: Yup, mine was similar. Haven't found a way to do it without massive `case` statements, yet.
|
309
309
|
:replies:
|
310
310
|
- :author: "[deleted]"
|
311
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwdjn3
|
311
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwdjn3
|
312
312
|
:body: |-
|
313
313
|
[Take a look at this person's solution using eval](https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwc4t3)
|
314
314
|
|
315
315
|
edit: nevermind, i guess you saw it :)
|
316
316
|
:replies:
|
317
317
|
- :author: '442401'
|
318
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwjwsj
|
318
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwjwsj
|
319
319
|
:body: "Yup, pretty sweet. \U0001F44D"
|
320
320
|
:replies: []
|
321
321
|
- :author: BluFoot
|
322
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwdsa8
|
322
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwdsa8
|
323
323
|
:body: This works if you can read it https://www.reddit.com/r/adventofcode/comments/r6zd93/comment/hmwdm4d/?utm_source=share&utm_medium=web2x&context=3
|
324
324
|
:replies:
|
325
325
|
- :author: '442401'
|
326
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwkcla
|
326
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwkcla
|
327
327
|
:body: Nice! I can just about follow that. It's amazing how flexible Ruby is, it can be as beautiful, or as ugly, as you choose. Whatever brings most joy! (Thank you, Matz)
|
328
328
|
:replies: []
|
329
329
|
- :author: CodeIsTheEnd
|
330
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwdh94
|
330
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwdh94
|
331
331
|
:body: |-
|
332
332
|
**Ruby** : 1:36/2:50, 87/82!
|
333
333
|
|
@@ -336,21 +336,21 @@
|
|
336
336
|
Made the leaderboard! Missing the '=' in a '+=' cost me 10 seconds on Part 2 and about 20 leaderboard spots.
|
337
337
|
:replies:
|
338
338
|
- :author: '442401'
|
339
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwktpz
|
339
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwktpz
|
340
340
|
:body: |-
|
341
341
|
_cough_ 26 seconds _cough_
|
342
342
|
|
343
343
|
Great effort though. I love your postmortems. Subscribed!
|
344
344
|
:replies: []
|
345
345
|
- :author: LyleiLanar
|
346
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwuhu5
|
346
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwuhu5
|
347
347
|
:body: |-
|
348
348
|
Here's my solution:
|
349
349
|
|
350
350
|
[I love unnecessary long code in Ruby :D](https://github.com/LyleiLanar/advent-of-code/blob/main/2021/day_2.rb)
|
351
351
|
:replies: []
|
352
352
|
- :author: ni3t
|
353
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwgy43
|
353
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwgy43
|
354
354
|
:body: |-
|
355
355
|
### Ruby
|
356
356
|
|
@@ -383,11 +383,11 @@
|
|
383
383
|
```
|
384
384
|
:replies:
|
385
385
|
- :author: snowe2010
|
386
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzh21n
|
386
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzh21n
|
387
387
|
:body: interesting solution
|
388
388
|
:replies: []
|
389
389
|
- :author: antoniotto
|
390
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwtdow
|
390
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmwtdow
|
391
391
|
:body: |-
|
392
392
|
My solution for part 2 in Ruby. Any advice warmly welcome. Thanks.
|
393
393
|
|
@@ -430,25 +430,25 @@
|
|
430
430
|
```
|
431
431
|
:replies:
|
432
432
|
- :author: snowe2010
|
433
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzgswt
|
433
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzgswt
|
434
434
|
:body: |-
|
435
435
|
for your instructions, you can use regex, but it's much simpler to just split the string, and then use multiple assignments to assign each value.
|
436
436
|
|
437
437
|
`direction, quantity = instruction.split`
|
438
438
|
:replies: []
|
439
439
|
- :author: jeffers0n
|
440
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmxb66r
|
440
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmxb66r
|
441
441
|
:body: |-
|
442
442
|
My Solution in Ruby is here: [https://git.doublehack.me/s00ner/AoC2021/src/branch/master/day02/solution.rb](https://git.doublehack.me/s00ner/AoC2021/src/branch/master/day02/solution.rb)
|
443
443
|
|
444
444
|
Pretty straightforward. Happy to hear criticism of my code.
|
445
445
|
:replies:
|
446
446
|
- :author: snowe2010
|
447
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzdq2m
|
447
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmzdq2m
|
448
448
|
:body: "looks good! easy to read I like it! I golfed mine so mine is completely unreadable \U0001F605"
|
449
449
|
:replies: []
|
450
450
|
- :author: dirtydave0221
|
451
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmxoq54
|
451
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmxoq54
|
452
452
|
:body: |-
|
453
453
|
[Day 2 Solution via SnapLogic IIP](https://imgur.com/6iVSWgn)
|
454
454
|
|
@@ -461,14 +461,14 @@
|
|
461
461
|
[All Solutions](https://imgur.com/a/t02e0dA)
|
462
462
|
:replies: []
|
463
463
|
- :author: roundscribehector5
|
464
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmxsizh
|
464
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmxsizh
|
465
465
|
:body: |-
|
466
466
|
[OOP Ruby Solution(refactored for part 2)](https://topaz.github.io/paste/#XQAAAQAZBQAAAAAAAAA5GUqKNoFH6SMnPH0B27EPe3NVv6DkupK7fPy5HX6q3gJULAlCRfWhi77KvRbNPpJROieHwkSIeYOkK5d9tLdEte6puwksCa3gAUZ1KWv2nahRgEEcme1gUjTMmgKr5rGLzUgHS3vnNeJL8WwOiGN4U8PRpt7nkTCl6jRTkwk/AUsrjx0EAEarywoCKb7Curm5fD5yqJW6wZ11XeDjHxocXesS5TZDJIRZX9orjbujOvRgGUpvHaIKw1nA+7RXZ03JHVLTW/JX58KzzxRD8IgARU3dnnmIUubpYDX0u47qRnbp/pd3Nlojz2hXo3ARbG9V3+g2indp1N4WjY5lqz349xBDvc0XPTbEz5wyWhtuu5gqV+DVCDpOAOgDjI9XCPwd4WtdvkUgicfJa/bCz1Udqralz7LXXx39aeHupR0g5yHbt9yTc1VD0h18XwSyJnnzxdUv5MiprCa3k5zIHU59oeuw0lYC97/qGBsl/t2DhGER4GrFCZ8yDhqzzKvbRacUE31qO31Uy4eLFQFZ/1wtu7XCKiqYDbVN0j1xu52YG+Nskc3dPP/3m9yh)
|
467
467
|
|
468
468
|
I'd appreciate any feedback.
|
469
469
|
:replies:
|
470
470
|
- :author: tsroelae
|
471
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmyodzn
|
471
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmyodzn
|
472
472
|
:body: |-
|
473
473
|
Nice, but to me, looks a bit focused on the problem at hand, maybe consider a more public API.
|
474
474
|
|
@@ -479,14 +479,14 @@
|
|
479
479
|
Though I kept converting instructions to method calls out of the class.
|
480
480
|
:replies:
|
481
481
|
- :author: roundscribehector5
|
482
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hn2lmmd
|
482
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hn2lmmd
|
483
483
|
:body: |-
|
484
484
|
Thank you, I appreciate the feedback.
|
485
485
|
|
486
486
|
I think I get the gist of what you're saying. Have the methods do less and combine them to solve the problem? Can you go into a little more detail of what you mean by public API?
|
487
487
|
:replies:
|
488
488
|
- :author: tsroelae
|
489
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hn7lkhw
|
489
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hn7lkhw
|
490
490
|
:body: |-
|
491
491
|
Sure, so the public API is the the way how you interact with an object from the outside.
|
492
492
|
|
@@ -497,6 +497,6 @@
|
|
497
497
|
But of course such things are unnecessary for actually solving advent of code, as strictly speaking you alway have one puzzle input and two outputs that you need. So from that perspective it's completely fine. I may be overdoing the OOP part for puzzles, but I like the practice. For day 4 I had 4 classes, a Parser, a Game and a Board class.
|
498
498
|
:replies: []
|
499
499
|
- :author: maattdd
|
500
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmyaqgp
|
500
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r6zd93/2021_day_2_solutions/hmyaqgp
|
501
501
|
:body: 'Functional Ruby : https://gist.github.com/maattdd/09ad91d44cf337857ed0d58f6a4d7be7'
|
502
502
|
:replies: []
|
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
- :author: lo-crawfish
|
3
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hqleezb
|
3
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hqleezb
|
4
4
|
:body: |-
|
5
5
|
Both part 1 & 2 in Ruby:
|
6
6
|
|
@@ -69,70 +69,70 @@
|
|
69
69
|
```
|
70
70
|
:replies: []
|
71
71
|
- :author: petercooper
|
72
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hnmrn32
|
72
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hnmrn32
|
73
73
|
:body: |-
|
74
74
|
**Ruby**
|
75
75
|
|
76
76
|
Many days late, but just because I haven't seen anyone else do this approach and because it's particularly short compared to others I've seen: [Gist](https://gist.github.com/peterc/d6e1272a9ba9707e8bde17f04491d119)
|
77
77
|
:replies: []
|
78
78
|
- :author: LyleiLanar
|
79
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hngnphq
|
79
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hngnphq
|
80
80
|
:body: |-
|
81
81
|
My Day3 Ruby solution:
|
82
82
|
|
83
83
|
[I love unnecessary long code in Ruby :D](https://github.com/LyleiLanar/advent-of-code/blob/main/2021/day_3.rb)
|
84
84
|
:replies: []
|
85
85
|
- :author: jeffers0n
|
86
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7o0iy
|
86
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7o0iy
|
87
87
|
:body: |-
|
88
88
|
[Ruby Solution](https://git.doublehack.me/s00ner/AoC2021/src/branch/master/day03/solution.rb)
|
89
89
|
|
90
90
|
I got part 1 done quickly and then got stuck on part 2 for a long time because I didn't read carefully and wasn't updating the most common bits part after each run through the list.
|
91
91
|
:replies:
|
92
92
|
- :author: Mountain_Ad_9551
|
93
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn95e39
|
93
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn95e39
|
94
94
|
:body: I did the exact same thing, definitely spent way more time than I should have - lesson learned.
|
95
95
|
:replies: []
|
96
96
|
- :author: ignurant
|
97
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7xyvk
|
97
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7xyvk
|
98
98
|
:body: |-
|
99
99
|
What led you to know `report[0].length.times { masks.push(2**_1) }` would be a good move? A friend did this in elixir yesterday and used a similar move, just hardcoded: `(1 <<< 12) - 1` for max, then max - gamma for epsilon.
|
100
100
|
|
101
101
|
What was your thought process for solving? I feel like I’m in a place where I can recognize certain tools could be handy, but don’t know enough about it to do anything.
|
102
102
|
:replies:
|
103
103
|
- :author: jeffers0n
|
104
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7zqft
|
104
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7zqft
|
105
105
|
:body: Mostly laziness and not wanting to write different code to handle the sample input and the real input since they were different lengths. I was a computer science student a long time ago (never graduated) but my intro classes were in C and we spend a good amount of time working with numbers in binary to really hammer home how computers see numbers so I think a lot of that knowledge is still in the back of my mind.
|
106
106
|
:replies: []
|
107
107
|
- :author: greatfool66
|
108
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7xufd
|
108
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7xufd
|
109
109
|
:body: Thank you! In hindsight if I had read the example calculations it would've been clear, but it would have been nice to say "be sure to dynamically update the common bits each time you change position of which bit you're looking at"
|
110
110
|
:replies:
|
111
111
|
- :author: la_nirna
|
112
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn8psle
|
112
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn8psle
|
113
113
|
:body: thank you. you are the only person I read so far that explained clearly what was causing the weird behavior I observed. I knew I was doing something wrong but... THANK YOU.
|
114
114
|
:replies: []
|
115
115
|
- :author: ignurant
|
116
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7vr0i
|
116
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7vr0i
|
117
117
|
:body: Lovely! I look forward to picking this apart. I knew there was some but masking stuff that could be applied, but don’t really know how. I was trying to take an approach where I was iterating per column for gamma and epsilon, and thought to use a bit array for masking the valid candidates for 02 and c02 at the same time. I’m not really sure if that would have worked like I wanted it to, but your solution is next level of what I was considering. You can see what I came up with [here](https://www.reddit.com/r/adventofcode/comments/r7r0ff/comment/hn4r52b/). Sadly, it’s confusing af. Thanks for sharing!
|
118
118
|
:replies:
|
119
119
|
- :author: jeffers0n
|
120
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7xzsu
|
120
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn7xzsu
|
121
121
|
:body: Thanks! Feel free to reach out if you have any questions. Part 1 I was able to make sense of in my head and code it out pretty smoothly. Part 2 was a different story since I didn't read it properly at first and ended up just fixing spaghetti code for the final working solution. I'd think it has potential be be less clunky.
|
122
122
|
:replies: []
|
123
123
|
- :author: Remarkable_Stick4000
|
124
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn716s4
|
124
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn716s4
|
125
125
|
:body: "**Ruby - Part 2 with transpose**\n\n[https://gist.github.com/kenzan100/797b993d5c6bff16ccf068c23e27ab2b](https://gist.github.com/kenzan100/797b993d5c6bff16ccf068c23e27ab2b)\n\nlet me know what you think about it \U0001F64F"
|
126
126
|
:replies: []
|
127
127
|
- :author: antoniotto
|
128
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn6z195
|
128
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn6z195
|
129
129
|
:body: |-
|
130
130
|
# Ruby
|
131
131
|
|
132
132
|
https://github.com/antoniotto71/Advent\_of\_Code\_2021/blob/master/Day%203/day3.rb
|
133
133
|
:replies: []
|
134
134
|
- :author: tom_collier2002
|
135
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn46c7o
|
135
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn46c7o
|
136
136
|
:body: |-
|
137
137
|
Ruby, part 1 only
|
138
138
|
|
@@ -153,7 +153,7 @@
|
|
153
153
|
```
|
154
154
|
:replies:
|
155
155
|
- :author: '442401'
|
156
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn5kkk7
|
156
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn5kkk7
|
157
157
|
:body: |-
|
158
158
|
formatted for us old folk on old reddit
|
159
159
|
|
@@ -174,11 +174,11 @@
|
|
174
174
|
```
|
175
175
|
:replies: []
|
176
176
|
- :author: "[deleted]"
|
177
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hnotpsy
|
177
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hnotpsy
|
178
178
|
:body: H... how?
|
179
179
|
:replies: []
|
180
180
|
- :author: dtinth
|
181
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn17c3c
|
181
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn17c3c
|
182
182
|
:body: |-
|
183
183
|
Ruby, 28 / 79
|
184
184
|
|
@@ -191,7 +191,7 @@
|
|
191
191
|
```
|
192
192
|
:replies:
|
193
193
|
- :author: dtinth
|
194
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn17g51
|
194
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn17g51
|
195
195
|
:body: |-
|
196
196
|
To find the most common, I used the group-then-count technique:
|
197
197
|
|
@@ -208,11 +208,11 @@
|
|
208
208
|
EDIT: u/ni3t and u/gurgeous [recommended](https://www.reddit.com/r/adventofcode/comments/r7r0ff/comment/hn1hqag/?utm_source=reddit&utm_medium=web2x&context=3) [`Enumerable#tally`](https://ruby-doc.org/core-2.7.0/Enumerable.html#method-i-tally), which is new in Ruby 2.7.
|
209
209
|
:replies:
|
210
210
|
- :author: gurgeous
|
211
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1evv8
|
211
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1evv8
|
212
212
|
:body: Also see `tally`. I like the count solution, though, since (unlike tally) it returns 0 if the value isn't present.
|
213
213
|
:replies: []
|
214
214
|
- :author: ni3t
|
215
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1hqag
|
215
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1hqag
|
216
216
|
:body: |-
|
217
217
|
I used tally:
|
218
218
|
|
@@ -221,15 +221,15 @@
|
|
221
221
|
```
|
222
222
|
:replies:
|
223
223
|
- :author: dtinth
|
224
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1mulo
|
224
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1mulo
|
225
225
|
:body: "Awesome, TIL about `Enumerable#tally` introduced in Ruby 2.7.\n\nMy Ruby knowledge is so 2.0. \U0001F972 Thank you, doing Advent of Code is a great way to learn new Ruby features."
|
226
226
|
:replies:
|
227
227
|
- :author: ni3t
|
228
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1zb2s
|
228
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1zb2s
|
229
229
|
:body: The numbered default positional params (\_1, \_2, etc) were introduced in 2.7 as well!
|
230
230
|
:replies: []
|
231
231
|
- :author: gurgeous
|
232
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn18m07
|
232
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn18m07
|
233
233
|
:body: |-
|
234
234
|
Ruby, 408/58. I always use strings for binary puzzles.
|
235
235
|
|
@@ -270,7 +270,7 @@
|
|
270
270
|
```
|
271
271
|
:replies: []
|
272
272
|
- :author: madethemcry
|
273
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1ewz3
|
273
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1ewz3
|
274
274
|
:body: |-
|
275
275
|
**Ruby** Naturally I recognized the opportunities for bitwise opertations. I know about bit planes and such. I even recognized that I can flip the bits in part 1 to get epsilon. Part 2 required to update epsilon and gamma after each turn (which I forget the first time). My mind constantly nagged me to make it beautiful with bitwise operations and such but this would have opened yet another rabbit hole I didn't want. So here we are with some naive solution. I'm happy I can move on.
|
276
276
|
|
@@ -349,11 +349,11 @@
|
|
349
349
|
```
|
350
350
|
:replies:
|
351
351
|
- :author: masterinthecage
|
352
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1f2ne
|
352
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1f2ne
|
353
353
|
:body: This is so nice, I did everything manually lol
|
354
354
|
:replies: []
|
355
355
|
- :author: CodeIsTheEnd
|
356
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1bcqb
|
356
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1bcqb
|
357
357
|
:body: |-
|
358
358
|
**Ruby** : 4:28/12:10, 360/182
|
359
359
|
|
@@ -362,15 +362,15 @@
|
|
362
362
|
Having a function to convert a string of 1s and 0s is a must of any coding competition, huh. I tried to outsmart Part 2 but it didn't work. That cost me some time, but I don't think it would have gotten me on the leaderboard.
|
363
363
|
:replies:
|
364
364
|
- :author: siebharinn
|
365
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1dr66
|
365
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1dr66
|
366
366
|
:body: binarystring.to\_i(2) will convert a binary string to an integer. No need to write your own.
|
367
367
|
:replies:
|
368
368
|
- :author: CodeIsTheEnd
|
369
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn3k7it
|
369
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn3k7it
|
370
370
|
:body: Oh, wow! I didn't know that! Thanks for the tip.
|
371
371
|
:replies: []
|
372
372
|
- :author: marshalofthemark
|
373
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1ea53
|
373
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1ea53
|
374
374
|
:body: |-
|
375
375
|
**Ruby**
|
376
376
|
|
@@ -410,14 +410,14 @@
|
|
410
410
|
```
|
411
411
|
:replies:
|
412
412
|
- :author: '442401'
|
413
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn5q21z
|
413
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn5q21z
|
414
414
|
:body: |-
|
415
415
|
I normally do the one's compliment while the data is still still a String
|
416
416
|
|
417
417
|
`"100101".tr("01", "10") # => "011010"`
|
418
418
|
:replies: []
|
419
419
|
- :author: Darth5harkie
|
420
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1ke7f
|
420
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1ke7f
|
421
421
|
:body: |-
|
422
422
|
## Rust
|
423
423
|
|
@@ -426,14 +426,14 @@
|
|
426
426
|
Learnings today: \* Trying to mix string and integral representations is a disaster. Pick one and use it. \* Re-implementing [from_str_radix](https://doc.rust-lang.org/std/primitive.u32.html#method.from_str_radix) isn't hard, but it's unnecessary. \* Iterators have lots of fun methods. I used partition, while others used retain. \* Bit shifts look nicer than `2u32.pow(bit)`... \* Rust ranges remind me of Ruby ranges, but I like the `..=` version!
|
427
427
|
:replies: []
|
428
428
|
- :author: roundscribehector5
|
429
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn3bg24
|
429
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn3bg24
|
430
430
|
:body: |-
|
431
431
|
[WET mess in Ruby](https://topaz.github.io/paste/#XQAAAQBaCQAAAAAAAAA5GUqKNoFH6SMnPH0B27EPe2miWFK6m8EZRtBouhvTjCYQJvou4Gfr/FLDUcNQ7hIiDLTf8/+t7QhPhBRZrmC5tIzUIK8riVbsmcmBxHmncTbFiX0h0fv/wBkVsBXz2VYS4f26lTSB2J1Fu0BWxlL7DdH4DdeSYLjXnDo3cC9yYK5pWJgx9HyjjNiq2hR9v+DBnMo+njcYq001k6aOJ0bD4sWO3w6wo7xJ0678fGm7+HudymArdQXKMNYhdHdb9r9fnv96xNUiAf+htKYOaCtNDlkLhJvMxMjOU5ZYKPUXz8wcQ+qnmVinIyP7ZHMjYkK4QJpihaolGuElUJ+kKeWvRLz2x9RjY4Zl+BPF8X+TL8N/jX5ym0OToKtWbqXAfEWrCSyyeukoEqQWsOcgCYBXVXATQC7d0a1hcPTSzWdVcnXfQ1iXgaWkfpC4mdRRYpQUNhyGr530lBxnCQTvx4AtyexLWpRoPXurW+0aM16TmmoqRT/A0fJ9//xHJ4IzpYECpYQKNB0M3Agn7ElBwdz0FyoPLga1BncaOvxsKUNGrZ3utbuVK8gBl0QZOZQJe0C2gSoJYrJnHqcSi+OyCCK+8gFOQRneoFxpPcDw2S/eDXnrW79AYvN++mCnmkp5go03lmLfiKz4qXWa+J1bu9ZhY+gwJ6HxJzJru0FWgywaxyLQlrelmcdyVUnvbW3PRI8RzarOGNCAd6woM6W5LHKbAXmAkl+E7x5sqigUpLsm+aSwhPNm/hj7nvbHl8t7EMmANwLWLiMwGMQvy22qc48v7AH97iSUjTclA4+jkmR7X6WGDmE1i2o4AlD9y/Ng4n7fTtCS+HcDN47MXAvQmO/+ah2cbErt1ULzv7r+/pA1)
|
432
432
|
|
433
433
|
Any feedback is welcome.
|
434
434
|
:replies: []
|
435
435
|
- :author: johnboker
|
436
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn3r5jp
|
436
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn3r5jp
|
437
437
|
:body: |-
|
438
438
|
Just learning some ruby
|
439
439
|
|
@@ -442,30 +442,30 @@
|
|
442
442
|
Comments welcome.
|
443
443
|
:replies:
|
444
444
|
- :author: J-Swift
|
445
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn3yi23
|
445
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn3yi23
|
446
446
|
:body: Small thing, but `for i in 0...length` is the same thing as `for i in 0..length - 1`
|
447
447
|
:replies:
|
448
448
|
- :author: johnboker
|
449
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn43m8h
|
449
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn43m8h
|
450
450
|
:body: Thanks!
|
451
451
|
:replies: []
|
452
452
|
- :author: BertZZ
|
453
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn5bduo
|
453
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn5bduo
|
454
454
|
:body: |-
|
455
455
|
This is a really cool solution, I hope you don't mind I heavily borrowed yours to help me with stage 1, I was having a nightmare. As thanks let me help you with your stage 2 refactor by sharing a method I wrote to find the oxygen value
|
456
456
|
|
457
457
|
https://gist.github.com/BertZZ/1993cec70a282c8223c0ed0fc065a004
|
458
458
|
:replies:
|
459
459
|
- :author: johnboker
|
460
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn5gsh0
|
460
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn5gsh0
|
461
461
|
:body: I don’t mind at all. Looking at your method I see a couple things I’ve not seen before.
|
462
462
|
:replies: []
|
463
463
|
- :author: ignurant
|
464
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn4r52b
|
464
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn4r52b
|
465
465
|
:body: My [Ruby solution](https://tzarnal.github.io/Opal/#XQAAAQABDQAAAAAAAAAxmwhIY/U9UKqMaKWbe6Flsjc1zTEY2+ua+vLboCxGNrQpGt0SFHrtoPmMM5vR5wJxgdvXzC+p5NGFMc3S6/qHLqYJNwfHDuxrMWueJHbAxiyJhXPXck3Fjv0ZSzfetcRwFTQ9iBhfIx5kv5NP0n8nRZb4j71B927wRLGt9RItQ4qrH2z0Bf2QA5GaxrUKPy4dxBwGi2vmkYubJ+Fd8bO5Gg9L8fYAE4L9ynH5yO3qGTJR02SAR/a61gtEOL2gI9qRSQinKyP/NU1LXbAs1hSTfN7sDuDjlu+1YloukkqeS+uJ1lhVxFWmehpYiU6pocB0FuFSD4LiAmDLkyUtpoJv2+iZorkSkC7lGzYD8RVpicM8GsJ3e5L7Qpn57LHmsU+NGfmolVf4S0PsXXwCqJKPr6akJKanGXA4ZMCJKQtFTw0UMET6nJPcc14bNZn4NNRkaFmkEvcbtxgWKgAHgyYWO0cvzrXXWod1q4sc4oz3gDCXG7U4F0x22jnOAWsjpx1JBkIEx3opfRhnqalj3uDRzpKr7Dls9oEr9Ao5Vkyy1mf6+rwSJ61B5BUNd8wi9UpNoJDoP/wW0Os3Y2Z+T3YWyEq5BlUv4fpek94d49tsxlQvU6itZWWgASCS0FS0qVaktASYaVQMfrJ30hJQvXz90B5yMLwLaiLBw8tivbKh0Oc9OxCpZvXcVNPSaIunTeRcZv3Ixyr2za92xwtBuINu+sy290BIxqsZNl28rU4T7vJfbgCXzVD48qti1NqwIewywhgA3t77ctNmrITVFmAE9oICrl3ZMnCMgrTaxN1Ob+LM6XqUWDoLjZtSdIz+MUEhDCNRGAg3DKfs+huMPSNY50mfOUlDiCYOql+c5vwO0me8F1s4wOe5TrUPhTtZRz2ehguYAG5fvUk1PTasZTbn4ATxgoizlXw3SYsSoN2UYHF5Z8E/9qSHckPOrQ4zdwGol0EUZXDsY4KqC+yg2RTKmyPlvcjry1mN4cwBkGqkjy/V9UtWC1uEQN+R8jpUmjqG4Rva+MXZBsVOlm15YsbENmmbNNMsNi7TRcTpO9bQRZoJpVB99Z1oQYhdrqT2fET8FgDYqt/RWx2pwoc8u4CkvdPc1hmnwzC9IkTO/VtWL7JOMsrR/yfNVkdQkklTQPCWZFoheZrm6OoWq8VrJ/WlKYqD+7C2oswK++J2+cuR/Woj95dVupjEF0zcndNEU2Bv7+NXdVTsc2qJdOEKW7nAI1/4i68YlhvcO2N7toLU1Eph5qpVSEMWTyRv7np2I6LJ0gME/mIolc94ootdpfxNYUKTab9XrMkoUzBqC4Q6jM4iVoBHiPY+3Y/GxAJl3V2ijlbie8lh3bDstZpc70G+RhMewSOKSoAClBA5VynVqPLOcKRFnK+XbgAIGh7/sw3bYcFUWAxbmcJeXmcBtcjMjntQajqen/vRlUGZxWZiDKOtPIk3qxLO0i2Zj4oRtpFIaG09l+IrF0/EFMEW0aw33K6s+JS7XVEg1DtrFVq4szZPJTkjZMecHF+VI8HK0+FVLphxGyv09vmztIT/fDidAA==). After seeing your guys' moves... man, alive.
|
466
466
|
:replies: []
|
467
467
|
- :author: EIykris
|
468
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn5jp9y
|
468
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn5jp9y
|
469
469
|
:body: |-
|
470
470
|
# Ruby, rb
|
471
471
|
|
@@ -491,7 +491,7 @@
|
|
491
491
|
```
|
492
492
|
:replies: []
|
493
493
|
- :author: ni3t
|
494
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1h3p8
|
494
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1h3p8
|
495
495
|
:body: |-
|
496
496
|
### Ruby
|
497
497
|
|
@@ -538,7 +538,7 @@
|
|
538
538
|
```
|
539
539
|
:replies: []
|
540
540
|
- :author: snowe2010
|
541
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1i9zq
|
541
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1i9zq
|
542
542
|
:body: |-
|
543
543
|
Ruby:
|
544
544
|
|
@@ -562,7 +562,7 @@
|
|
562
562
|
```
|
563
563
|
:replies: []
|
564
564
|
- :author: StMonty
|
565
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1m7c7
|
565
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn1m7c7
|
566
566
|
:body: |-
|
567
567
|
Ruby Part 1: This is pretty hacky, still learning but was fun
|
568
568
|
|
@@ -579,7 +579,7 @@
|
|
579
579
|
```
|
580
580
|
:replies: []
|
581
581
|
- :author: lucianoq
|
582
|
-
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn2enf9
|
582
|
+
:url: https://www.reddit.com/r/adventofcode/comments/r7r0ff/2021_day_3_solutions/hn2enf9
|
583
583
|
:body: |-
|
584
584
|
Ruby, part1:
|
585
585
|
|