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.
Files changed (245) hide show
  1. checksums.yaml +4 -4
  2. data/bin/arb +1 -1
  3. data/data/solutions/reddit/ruby/2015/02.yml +5 -5
  4. data/data/solutions/reddit/ruby/2015/03.yml +6 -6
  5. data/data/solutions/reddit/ruby/2015/04.yml +7 -7
  6. data/data/solutions/reddit/ruby/2015/05.yml +6 -6
  7. data/data/solutions/reddit/ruby/2015/06.yml +14 -14
  8. data/data/solutions/reddit/ruby/2015/07.yml +15 -15
  9. data/data/solutions/reddit/ruby/2015/08.yml +6 -6
  10. data/data/solutions/reddit/ruby/2015/09.yml +11 -11
  11. data/data/solutions/reddit/ruby/2015/10.yml +18 -18
  12. data/data/solutions/reddit/ruby/2015/11.yml +19 -19
  13. data/data/solutions/reddit/ruby/2015/12.yml +10 -10
  14. data/data/solutions/reddit/ruby/2015/13.yml +9 -9
  15. data/data/solutions/reddit/ruby/2015/14.yml +11 -11
  16. data/data/solutions/reddit/ruby/2015/15.yml +9 -9
  17. data/data/solutions/reddit/ruby/2015/16.yml +7 -7
  18. data/data/solutions/reddit/ruby/2015/17.yml +10 -10
  19. data/data/solutions/reddit/ruby/2015/18.yml +4 -4
  20. data/data/solutions/reddit/ruby/2015/19.yml +1 -1
  21. data/data/solutions/reddit/ruby/2015/20.yml +2 -2
  22. data/data/solutions/reddit/ruby/2015/21.yml +4 -4
  23. data/data/solutions/reddit/ruby/2015/22.yml +5 -5
  24. data/data/solutions/reddit/ruby/2015/23.yml +3 -3
  25. data/data/solutions/reddit/ruby/2015/24.yml +11 -11
  26. data/data/solutions/reddit/ruby/2015/25.yml +5 -5
  27. data/data/solutions/reddit/ruby/2016/01.yml +5 -5
  28. data/data/solutions/reddit/ruby/2016/02.yml +3 -3
  29. data/data/solutions/reddit/ruby/2016/03.yml +1 -1
  30. data/data/solutions/reddit/ruby/2016/04.yml +4 -4
  31. data/data/solutions/reddit/ruby/2016/05.yml +3 -3
  32. data/data/solutions/reddit/ruby/2016/06.yml +4 -4
  33. data/data/solutions/reddit/ruby/2016/07.yml +3 -3
  34. data/data/solutions/reddit/ruby/2016/08.yml +6 -6
  35. data/data/solutions/reddit/ruby/2016/09.yml +1 -1
  36. data/data/solutions/reddit/ruby/2016/10.yml +3 -3
  37. data/data/solutions/reddit/ruby/2016/11.yml +1 -1
  38. data/data/solutions/reddit/ruby/2016/12.yml +3 -3
  39. data/data/solutions/reddit/ruby/2016/14.yml +4 -4
  40. data/data/solutions/reddit/ruby/2016/15.yml +11 -11
  41. data/data/solutions/reddit/ruby/2016/16.yml +1 -1
  42. data/data/solutions/reddit/ruby/2016/17.yml +3 -3
  43. data/data/solutions/reddit/ruby/2016/18.yml +3 -3
  44. data/data/solutions/reddit/ruby/2016/20.yml +2 -2
  45. data/data/solutions/reddit/ruby/2016/21.yml +7 -7
  46. data/data/solutions/reddit/ruby/2016/22.yml +10 -10
  47. data/data/solutions/reddit/ruby/2017/01.yml +7 -7
  48. data/data/solutions/reddit/ruby/2017/02.yml +15 -15
  49. data/data/solutions/reddit/ruby/2017/03.yml +9 -9
  50. data/data/solutions/reddit/ruby/2017/04.yml +4 -4
  51. data/data/solutions/reddit/ruby/2017/05.yml +12 -12
  52. data/data/solutions/reddit/ruby/2017/06.yml +16 -16
  53. data/data/solutions/reddit/ruby/2017/07.yml +5 -5
  54. data/data/solutions/reddit/ruby/2017/08.yml +18 -18
  55. data/data/solutions/reddit/ruby/2017/09.yml +7 -7
  56. data/data/solutions/reddit/ruby/2017/10.yml +9 -9
  57. data/data/solutions/reddit/ruby/2017/11.yml +1 -1
  58. data/data/solutions/reddit/ruby/2017/12.yml +6 -6
  59. data/data/solutions/reddit/ruby/2017/13.yml +6 -6
  60. data/data/solutions/reddit/ruby/2017/14.yml +1 -1
  61. data/data/solutions/reddit/ruby/2017/15.yml +3 -3
  62. data/data/solutions/reddit/ruby/2017/16.yml +5 -5
  63. data/data/solutions/reddit/ruby/2017/17.yml +6 -6
  64. data/data/solutions/reddit/ruby/2017/18.yml +7 -7
  65. data/data/solutions/reddit/ruby/2017/19.yml +2 -2
  66. data/data/solutions/reddit/ruby/2017/20.yml +5 -5
  67. data/data/solutions/reddit/ruby/2017/21.yml +11 -11
  68. data/data/solutions/reddit/ruby/2017/22.yml +1 -1
  69. data/data/solutions/reddit/ruby/2017/23.yml +1 -1
  70. data/data/solutions/reddit/ruby/2017/25.yml +3 -3
  71. data/data/solutions/reddit/ruby/2018/01.yml +20 -20
  72. data/data/solutions/reddit/ruby/2018/02.yml +16 -16
  73. data/data/solutions/reddit/ruby/2018/03.yml +12 -12
  74. data/data/solutions/reddit/ruby/2018/04.yml +6 -6
  75. data/data/solutions/reddit/ruby/2018/05.yml +15 -15
  76. data/data/solutions/reddit/ruby/2018/06.yml +4 -4
  77. data/data/solutions/reddit/ruby/2018/07.yml +11 -11
  78. data/data/solutions/reddit/ruby/2018/08.yml +9 -9
  79. data/data/solutions/reddit/ruby/2018/09.yml +13 -13
  80. data/data/solutions/reddit/ruby/2018/10.yml +10 -10
  81. data/data/solutions/reddit/ruby/2018/11.yml +9 -9
  82. data/data/solutions/reddit/ruby/2018/12.yml +2 -2
  83. data/data/solutions/reddit/ruby/2018/13.yml +14 -14
  84. data/data/solutions/reddit/ruby/2018/14.yml +5 -5
  85. data/data/solutions/reddit/ruby/2018/15.yml +2 -2
  86. data/data/solutions/reddit/ruby/2018/16.yml +7 -7
  87. data/data/solutions/reddit/ruby/2018/17.yml +1 -1
  88. data/data/solutions/reddit/ruby/2018/18.yml +6 -6
  89. data/data/solutions/reddit/ruby/2018/19.yml +1 -1
  90. data/data/solutions/reddit/ruby/2018/20.yml +1 -1
  91. data/data/solutions/reddit/ruby/2018/21.yml +4 -4
  92. data/data/solutions/reddit/ruby/2018/22.yml +3 -3
  93. data/data/solutions/reddit/ruby/2018/23.yml +11 -11
  94. data/data/solutions/reddit/ruby/2018/24.yml +4 -4
  95. data/data/solutions/reddit/ruby/2018/25.yml +6 -6
  96. data/data/solutions/reddit/ruby/2019/01.yml +11 -11
  97. data/data/solutions/reddit/ruby/2019/02.yml +13 -13
  98. data/data/solutions/reddit/ruby/2019/03.yml +7 -7
  99. data/data/solutions/reddit/ruby/2019/04.yml +11 -11
  100. data/data/solutions/reddit/ruby/2019/05.yml +10 -10
  101. data/data/solutions/reddit/ruby/2019/06.yml +7 -7
  102. data/data/solutions/reddit/ruby/2019/07.yml +8 -8
  103. data/data/solutions/reddit/ruby/2019/08.yml +8 -8
  104. data/data/solutions/reddit/ruby/2019/09.yml +4 -4
  105. data/data/solutions/reddit/ruby/2019/10.yml +4 -4
  106. data/data/solutions/reddit/ruby/2019/11.yml +7 -7
  107. data/data/solutions/reddit/ruby/2019/12.yml +17 -17
  108. data/data/solutions/reddit/ruby/2019/13.yml +6 -6
  109. data/data/solutions/reddit/ruby/2019/14.yml +2 -2
  110. data/data/solutions/reddit/ruby/2019/15.yml +3 -3
  111. data/data/solutions/reddit/ruby/2019/16.yml +6 -6
  112. data/data/solutions/reddit/ruby/2019/17.yml +3 -3
  113. data/data/solutions/reddit/ruby/2019/18.yml +1 -1
  114. data/data/solutions/reddit/ruby/2019/20.yml +9 -9
  115. data/data/solutions/reddit/ruby/2019/21.yml +3 -3
  116. data/data/solutions/reddit/ruby/2019/22.yml +3 -3
  117. data/data/solutions/reddit/ruby/2019/23.yml +1 -1
  118. data/data/solutions/reddit/ruby/2019/25.yml +2 -2
  119. data/data/solutions/reddit/ruby/2020/01.yml +30 -30
  120. data/data/solutions/reddit/ruby/2020/02.yml +25 -25
  121. data/data/solutions/reddit/ruby/2020/03.yml +17 -17
  122. data/data/solutions/reddit/ruby/2020/04.yml +26 -26
  123. data/data/solutions/reddit/ruby/2020/05.yml +35 -35
  124. data/data/solutions/reddit/ruby/2020/06.yml +40 -40
  125. data/data/solutions/reddit/ruby/2020/07.yml +16 -16
  126. data/data/solutions/reddit/ruby/2020/08.yml +13 -13
  127. data/data/solutions/reddit/ruby/2020/09.yml +21 -21
  128. data/data/solutions/reddit/ruby/2020/10.yml +29 -29
  129. data/data/solutions/reddit/ruby/2020/11.yml +8 -8
  130. data/data/solutions/reddit/ruby/2020/12.yml +22 -22
  131. data/data/solutions/reddit/ruby/2020/13.yml +15 -15
  132. data/data/solutions/reddit/ruby/2020/14.yml +11 -11
  133. data/data/solutions/reddit/ruby/2020/15.yml +9 -9
  134. data/data/solutions/reddit/ruby/2020/16.yml +13 -13
  135. data/data/solutions/reddit/ruby/2020/17.yml +11 -11
  136. data/data/solutions/reddit/ruby/2020/18.yml +19 -19
  137. data/data/solutions/reddit/ruby/2020/19.yml +18 -18
  138. data/data/solutions/reddit/ruby/2020/20.yml +4 -4
  139. data/data/solutions/reddit/ruby/2020/21.yml +4 -4
  140. data/data/solutions/reddit/ruby/2020/22.yml +8 -8
  141. data/data/solutions/reddit/ruby/2020/23.yml +4 -4
  142. data/data/solutions/reddit/ruby/2020/24.yml +6 -6
  143. data/data/solutions/reddit/ruby/2020/25.yml +6 -6
  144. data/data/solutions/reddit/ruby/2021/01.yml +74 -74
  145. data/data/solutions/reddit/ruby/2021/02.yml +45 -45
  146. data/data/solutions/reddit/ruby/2021/03.yml +43 -43
  147. data/data/solutions/reddit/ruby/2021/04.yml +23 -23
  148. data/data/solutions/reddit/ruby/2021/05.yml +16 -16
  149. data/data/solutions/reddit/ruby/2021/06.yml +35 -35
  150. data/data/solutions/reddit/ruby/2021/07.yml +26 -26
  151. data/data/solutions/reddit/ruby/2021/08.yml +15 -15
  152. data/data/solutions/reddit/ruby/2021/09.yml +11 -11
  153. data/data/solutions/reddit/ruby/2021/10.yml +9 -9
  154. data/data/solutions/reddit/ruby/2021/11.yml +12 -12
  155. data/data/solutions/reddit/ruby/2021/12.yml +8 -8
  156. data/data/solutions/reddit/ruby/2021/13.yml +13 -13
  157. data/data/solutions/reddit/ruby/2021/14.yml +10 -10
  158. data/data/solutions/reddit/ruby/2021/15.yml +10 -10
  159. data/data/solutions/reddit/ruby/2021/16.yml +8 -8
  160. data/data/solutions/reddit/ruby/2021/17.yml +6 -6
  161. data/data/solutions/reddit/ruby/2021/18.yml +5 -5
  162. data/data/solutions/reddit/ruby/2021/19.yml +3 -3
  163. data/data/solutions/reddit/ruby/2021/20.yml +5 -5
  164. data/data/solutions/reddit/ruby/2021/21.yml +5 -5
  165. data/data/solutions/reddit/ruby/2021/22.yml +4 -4
  166. data/data/solutions/reddit/ruby/2021/23.yml +7 -7
  167. data/data/solutions/reddit/ruby/2021/24.yml +8 -8
  168. data/data/solutions/reddit/ruby/2021/25.yml +4 -4
  169. data/data/solutions/reddit/ruby/2022/01.yml +29 -29
  170. data/data/solutions/reddit/ruby/2022/02.yml +21 -21
  171. data/data/solutions/reddit/ruby/2022/03.yml +35 -35
  172. data/data/solutions/reddit/ruby/2022/04.yml +42 -42
  173. data/data/solutions/reddit/ruby/2022/05.yml +29 -29
  174. data/data/solutions/reddit/ruby/2022/06.yml +38 -38
  175. data/data/solutions/reddit/ruby/2022/07.yml +25 -25
  176. data/data/solutions/reddit/ruby/2022/08.yml +9 -9
  177. data/data/solutions/reddit/ruby/2022/09.yml +18 -18
  178. data/data/solutions/reddit/ruby/2022/10.yml +14 -14
  179. data/data/solutions/reddit/ruby/2022/11.yml +7 -7
  180. data/data/solutions/reddit/ruby/2022/12.yml +2 -2
  181. data/data/solutions/reddit/ruby/2022/13.yml +9 -9
  182. data/data/solutions/reddit/ruby/2022/14.yml +5 -5
  183. data/data/solutions/reddit/ruby/2022/15.yml +6 -6
  184. data/data/solutions/reddit/ruby/2022/16.yml +5 -5
  185. data/data/solutions/reddit/ruby/2022/17.yml +2 -2
  186. data/data/solutions/reddit/ruby/2022/18.yml +6 -6
  187. data/data/solutions/reddit/ruby/2022/19.yml +3 -3
  188. data/data/solutions/reddit/ruby/2022/20.yml +12 -12
  189. data/data/solutions/reddit/ruby/2022/21.yml +11 -11
  190. data/data/solutions/reddit/ruby/2022/22.yml +4 -4
  191. data/data/solutions/reddit/ruby/2022/24.yml +10 -10
  192. data/data/solutions/reddit/ruby/2022/25.yml +10 -10
  193. data/data/solutions/reddit/ruby/2023/01.yml +52 -52
  194. data/data/solutions/reddit/ruby/2023/02.yml +21 -21
  195. data/data/solutions/reddit/ruby/2023/03.yml +18 -18
  196. data/data/solutions/reddit/ruby/2023/04.yml +31 -31
  197. data/data/solutions/reddit/ruby/2023/05.yml +14 -14
  198. data/data/solutions/reddit/ruby/2023/06.yml +24 -24
  199. data/data/solutions/reddit/ruby/2023/07.yml +32 -32
  200. data/data/solutions/reddit/ruby/2023/08.yml +20 -20
  201. data/data/solutions/reddit/ruby/2023/09.yml +32 -32
  202. data/data/solutions/reddit/ruby/2023/10.yml +18 -18
  203. data/data/solutions/reddit/ruby/2023/11.yml +16 -16
  204. data/data/solutions/reddit/ruby/2023/12.yml +5 -5
  205. data/data/solutions/reddit/ruby/2023/13.yml +6 -6
  206. data/data/solutions/reddit/ruby/2023/14.yml +14 -14
  207. data/data/solutions/reddit/ruby/2023/15.yml +13 -13
  208. data/data/solutions/reddit/ruby/2023/16.yml +8 -8
  209. data/data/solutions/reddit/ruby/2023/18.yml +5 -5
  210. data/data/solutions/reddit/ruby/2023/19.yml +6 -6
  211. data/data/solutions/reddit/ruby/2023/20.yml +9 -9
  212. data/data/solutions/reddit/ruby/2023/21.yml +5 -5
  213. data/data/solutions/reddit/ruby/2023/22.yml +2 -2
  214. data/data/solutions/reddit/ruby/2023/23.yml +1 -1
  215. data/data/solutions/reddit/ruby/2023/25.yml +1 -1
  216. data/data/solutions/reddit/ruby/2024/01.yml +15 -15
  217. data/data/solutions/reddit/ruby/2024/02.yml +17 -17
  218. data/data/solutions/reddit/ruby/2024/03.yml +43 -43
  219. data/data/solutions/reddit/ruby/2024/04.yml +18 -18
  220. data/data/solutions/reddit/ruby/2024/05.yml +29 -29
  221. data/data/solutions/reddit/ruby/2024/06.yml +19 -19
  222. data/data/solutions/reddit/ruby/2024/07.yml +26 -26
  223. data/data/solutions/reddit/ruby/2024/08.yml +15 -15
  224. data/data/solutions/reddit/ruby/2024/09.yml +5 -5
  225. data/data/solutions/reddit/ruby/2024/10.yml +9 -9
  226. data/data/solutions/reddit/ruby/2024/11.yml +15 -15
  227. data/data/solutions/reddit/ruby/2024/12.yml +9 -9
  228. data/data/solutions/reddit/ruby/2024/13.yml +10 -10
  229. data/data/solutions/reddit/ruby/2024/14.yml +6 -6
  230. data/data/solutions/reddit/ruby/2024/15.yml +5 -5
  231. data/data/solutions/reddit/ruby/2024/16.yml +4 -4
  232. data/data/solutions/reddit/ruby/2024/17.yml +11 -11
  233. data/data/solutions/reddit/ruby/2024/18.yml +9 -9
  234. data/data/solutions/reddit/ruby/2024/19.yml +16 -16
  235. data/data/solutions/reddit/ruby/2024/20.yml +8 -8
  236. data/data/solutions/reddit/ruby/2024/21.yml +3 -3
  237. data/data/solutions/reddit/ruby/2024/22.yml +8 -8
  238. data/data/solutions/reddit/ruby/2024/23.yml +13 -13
  239. data/data/solutions/reddit/ruby/2024/24.yml +7 -7
  240. data/data/solutions/reddit/ruby/2024/25.yml +14 -14
  241. data/lib/arb/api/aoc.rb +2 -2
  242. data/lib/arb/cli/run.rb +2 -3
  243. data/lib/arb/version.rb +1 -1
  244. data/lib/download_solutions/api/reddit/get_serial_comments.rb +1 -1
  245. metadata +2 -2
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  - :author: FCBStar-of-the-South
3
- :url: https://www.reddit.com/r/adventofcode/comments/1hfboft/2024_day_16_solutions/m2kuqgw/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/1hfboft/2024_day_16_solutions/m2kuqgw
4
4
  :body: |-
5
5
  Didn't have much time to work on this yesterday. Pretty much just a straight-shoot A\* but finding a priority queue gem with all the needed functionality took a while (still learning the language). show\_path is for debugging only.
6
6
 
7
7
  [paste](https://topaz.github.io/paste/#XQAAAQD7CgAAAAAAAAA5GUqKNoFH9WVqAtfQAlEIpeJL/pI3jz8l8zNIKbgBcHDkxoKCi/QicVvXncjAUUoxkur5sqQIbSDx0EVfweW3ZBi4EtB90UU2lVihnGKgad/aNndLI1/96SSzT9/XIkQE9bEwoDE+cjtfansHNQsT0mbhdU/+I8GNDOKAX2/S+NgzD7SAYOeVot2EAjLeg4Xeax1wTLHCxhcYPx8TtwpF+UQPBHw2B6299QQ6vja1sg+rJfvLRnkvgfis5melbecWtAig6a5sVjU7m6E4LzFVLevGnL1ptUPGUQQ4WPg0t6c5y9qYr4t/IVg9FR2wqBNE8w4Xp2YwQ5zzTV2/CgnFDO+piJ4ohxbn8JnR1H8hQL5ecYDonEEb1mtdoErmdy6zEoPSU9qDC7Uj06FCV13yo9U+9kY3pdb2vbzCHqHuSEn2ypELHY63vkNCbA7yKsg+y4DjIlxmJhfOJWCTYne/SYUS9Qu0P9tMg3fDYjUlnkw2mf/4aPdejIpn3iFw70/VlvhTYr5NY+zqKGOD2Hdmivi1gHmvh39aq/2ElQyRz7ZvY/uHeqmAvTN+moGbxGYj2YbivaCNYf1lfvBuI69CwNUhylms5lS9fX+ibXNBbreme3E3QliDtI9EI1nrXFE8OFzfkxnBpdA7IvpzG1PUof0nhImSBH+pr4r9AVjSH2U7KiWhaXia5+Ds+el6z3LFMNLx4/mkAvOG849gzkkhI/p5THN0T+ZvMQ8CHR8WnOrejtM5v1bG+gcW0W0voT/Lnfr4DKsyQ2bvcgaRyDlyGXTRjSVZ/7PJSQ6lTvgsekNx1dAg26fzRRRpoBYMrIE8tjntQIXqL+wdwIfrwnLJniGztyWwdd5xX3aqQ9VQu3P7PdS9x+/sSTtDUaqBXgbVXJCUTWkJrvfYPsTuN4JuOCjO09ORJLYjbM3pinvlaKdvMKj5g2Bri9+9kYa4KyLACCjblk6oJfJCixO4WhyZNP9xmHprNhvsmMMiyissGJb684XMSprZp/L6kYZ2eCno3aydx5MI3gLnS8R/BhXzpflUNHvGLC6NPQHFC1A2sYFGpgW3APfC9JBlxGlNpsoBMLY7UZGiPzZfP0uubBIIPV1UYPLt2Af+AxGIaEODLBHxeGoam8habktqeTYl3NhBFcKprdM16hx1jP9ElOXdOUDzmk1ld9J5n6K2yvvZySmYaJZu2znrInEvjfopjPzG5oQai55agyJoHh+4d6whHQfcLdCPO0fRrIkeadv9To75aRXj7hIoEGG3Z+Ui7lXnnUXQUvIewNJHKCkiFyKgS0MhLgP9hkAWYvH3PByoX0uAeD/Di7KKYO3p/aW2b0mB44m+uqTr1TSmN4c3BLfuV5FqmqKAfgSEFKAWsDo3P4K25YhNe4TC0tBDIn/+8EdO)
8
8
  :replies: []
9
9
  - :author: JAntaresN
10
- :url: https://www.reddit.com/r/adventofcode/comments/1hfboft/2024_day_16_solutions/m2fcks7/
10
+ :url: https://www.reddit.com/r/adventofcode/comments/1hfboft/2024_day_16_solutions/m2fcks7
11
11
  :body: |-
12
12
  [Day 16](https://github.com/jw-rx-93/advent-of-code-2024/blob/main/day16/day16.rb)
13
13
 
@@ -16,13 +16,13 @@
16
16
  For Part 2 I didn't quite understand what they meant by best path, but after a while I got it, and it became clear we could do a dfs after we know the final score, the idea is there can be multiple path that leads to the end point with the same score. We want to find all those path, so it became a relatively straight forward dfs to find the path. Then you can store the chain in a set, which would give you a unique count at the end.
17
17
  :replies: []
18
18
  - :author: careyi4
19
- :url: https://www.reddit.com/r/adventofcode/comments/1hfboft/2024_day_16_solutions/m2d2o8k/
19
+ :url: https://www.reddit.com/r/adventofcode/comments/1hfboft/2024_day_16_solutions/m2d2o8k
20
20
  :body: |-
21
21
  Super messy, implemented Dijkstra, then used the info from this to rewalk the graph pruning for paths the exceep the shortest path to each node. Works, but not pretty!
22
22
 
23
23
  [https://github.com/careyi3/aoc\_2024/tree/master/solutions/16](https://github.com/careyi3/aoc_2024/tree/master/solutions/16)
24
24
  :replies: []
25
25
  - :author: Stronbold
26
- :url: https://www.reddit.com/r/adventofcode/comments/1hfboft/2024_day_16_solutions/m2c4bi8/
26
+ :url: https://www.reddit.com/r/adventofcode/comments/1hfboft/2024_day_16_solutions/m2c4bi8
27
27
  :body: "[Solution](https://github.com/Alvaro-Kothe/Advent-of-Code/blob/main/2024/day16.rb)"
28
28
  :replies: []
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: Symbroson
3
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2t16pp/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2t16pp
4
4
  :body: |-
5
5
  late to the party, because I didn't think my approach through the end
6
6
 
@@ -13,14 +13,14 @@
13
13
  The full ruby code is available [here](https://github.com/alex-Symbroson/Advent-of-Code/blob/master/2024/17.rb) and there is also C++ version also available [here](https://github.com/alex-Symbroson/Advent-of-Code/blob/master/2024/17.cpp)
14
14
  :replies: []
15
15
  - :author: eggselent_folk
16
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2pnlcb/
16
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2pnlcb
17
17
  :body: |-
18
18
  [Code](https://topaz.github.io/paste/#XQAAAQBeCQAAAAAAAAARiAqHodvKIwHSvNw9kKWn/nYvsilVuEqA02Yvh73BCxyQtWtpitgBJEp5hJogQfXndNsYMoivkyHhpWNZLlIYputlxm3To4bk40Bv6y7Xub1USc6R5yr0jAlIK62Z9OZy0fhCy4JMLwcaDZlNf2Rdm1ryPwCNBC5/7aXJMlKROh3BfSyBI+Uy5tYoXczafdX4cY+hAC57q+y6ODUHpUg6U+wf3ZmCJEMaadzeP2ViPskDmHi7JF3F/2/+wpWHjY+FtSjwFp/K8SbptL2PxGvGiJ9sbtLlfEuNHoPF6zEOBbdElRt4JaPkVJJv1pkX+d8TlP6sKymTXnKG+yJVqCB9kuqDov6a/0S8ViCjplymRnJDIZFWD96wZTqjrBSmbG74+Dqe8uCkhyJGkGaLSzp5ne1o9gxwDe8x13lwVC52uil+uAz15ounMtqpvmQhlCk+aW0GG8TEqXQv5rkGp6LkLoKh6JIqfoXH3XJPAosaX04x1IN2PVyIoGG9xqDCMPYbeAtTiDowz75M+KQJ3BF/e03A4B0PiuSe+bu7TVGeGbJYEsJ/vjHILw/8HswDJxQ0Q441Il7K15TfrYU7lMNGtBKJINtsyKuwIpGradRE9hWXTp/8cSpYNlKv9NHnug2Qdw3+HNpWgoZ8+HeNxG5NooyU2hz7P+UeQfZnZWRK5eKxze6I2DZMKJR8nG+W/wYF0fYQq53tj7xbC0XGycJ0WcxWODHPGzpeRsIzf/MdidIZ94MZaoH7qowOOZPScXy82wwDZYI938R1fJswWAQftyBpkXGG7P6hl3AdBB5UKu0UWpDTAiwi/qge7jTHtsaoyziO6sJ4y9pKZBRXijqDDAfKNZ6dWo0OfNXFeqZ4eVWHhJ0R918GUCRE+CvrCPlNLbeZ2wX6dCaw3JkxyrlsKRVnk5nnYy3a6UFyn7A8tTZurpvt3jqm1HODTFkKm2tqOE4ZP1vmizqOMYssotD6OL64ZRSrI1W3PFN9zBavriIBsqzfcDy4chlEAPsPeqhKyICd0fiZcQpTk7HPY+EgbmkDcbWJOI1fIN5wRlPpIaYarji0myUt7usEWao/saqGr/9D9zsA)
19
19
 
20
20
  This one is super challenging. I had already reverse-engineered the instructions since yesterday because brute forcing is not possible, but I could not figure out how to quickly remove the impossible cases. I need to come back the next day and have a read on Reddit comments ☺️, to finally realize my wrong approach to test the register A number.
21
21
  :replies: []
22
22
  - :author: jafuentest
23
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2ns6ah/
23
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2ns6ah
24
24
  :body: |-
25
25
  Got part 2 to run in ~0.090s
26
26
 
@@ -35,7 +35,7 @@
35
35
  [Here's the code](https://raw.githubusercontent.com/jafuentest/advent-of-code/refs/heads/main/2024/solution-17-2.rb)
36
36
  :replies: []
37
37
  - :author: yourparadigm
38
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2kvvae/
38
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2kvvae
39
39
  :body: |-
40
40
  [LANGUAGE: Ruby + Go]
41
41
 
@@ -46,7 +46,7 @@
46
46
  [Ruby](https://github.com/phene/advent-of-code/blob/main/2024/17/17.rb) and [Go](https://github.com/phene/advent-of-code/blob/main/2024/17/17.go)
47
47
  :replies: []
48
48
  - :author: JAntaresN
49
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2kvu0c/
49
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2kvu0c
50
50
  :body: |-
51
51
  [git link](https://github.com/jw-rx-93/advent-of-code-2024/blob/main/day17/day17.rb)
52
52
 
@@ -59,7 +59,7 @@
59
59
  Edit: So, I am almost certain everyone has the 0, 3 instruction in their chain because that is the only operation that can change A, in other words, you can use that to your advantage because once you know A, the other values should be determinable programmatically even if you dont what your program's routine is
60
60
  :replies: []
61
61
  - :author: FCBStar-of-the-South
62
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2kubku/
62
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2kubku
63
63
  :body: |-
64
64
  [part1](https://topaz.github.io/paste/#XQAAAQDCBwAAAAAAAAARiArGwlYyUY4y4+WXcBMx4AslbmwFSidMZ9Hevh3xVA2dW72YBXGMPfL/wI7RP69L7aVaWqtyPOxw2CanNE1oQ80boojjqwC7+uN804+FxmmMONZpbzehJAU4wRQLn73839CWEtvaxc2pYLBommamF4lPyzcqzCwA61hoXkOlhzg3QvYjnCNXElBbjKUh1h/ZRZxbXrV+rmqAsgxe+Vm3YMwoTw/CJHgoBn9eCRqLmnlweORtd/72b3/WvJDe7acD5pNlIn15NVh3LecKCoBptKyKC53JXC4NWF9fwMM/C1eVbEboPaYfcsoDeLIuO6Xew9ynnWK4Hd4ETU3Z2nbkYQlDZTaHSc+JhlrLaohnVa3/Ymv2ya2/Xadl5gRZqzHlftF3P9kg+yT8jDmCGNqBsAGBMUY209WBDlC1eWWQe4oGcrktTqP7T8a9Kp5tSUgHeCVSwppftAzF3EqdMmgEIhxe7in408mSz7im/XJxUfJrFRHqa9VdiOGnu+f0oTcoyINxT6U/EaMmc/Sd7Mt3W5C6MyRnIFE3dbtUNtUi6E6fEXMqxopvf10ffTVwIKAAWs0PEzh3ntBSy29JLJFNRRidGsqE4hrFH0Sg+6pxnuLQDeB8jqhU83gSsOOi5J8DQxJU0bgbk+7SVa09UiPhK97PKeKz28LqqbJ8S7+72Ctxwf13SEeHMYswCgjrCnq3fChj6WOz5CqsTvxItQg/ptxZxbmvWYtqiTJ2lm7ilVrUwhQuGZEtPeTOwdq/wpwvqL1y52iJTj1vD1frPw5R3gmgARhlE/0Y/kkxPHFHZ0HRwuzspyq0BNzeF+6elwKIRdLx7uhD5Ke0JjW9DNFXRaOPEmsQLP3sMCGdkYvK7NAi+PpvyK5fSwviCaM4ym6dBUOpZQxl1G3CaEixj6P/8OLDVg==)
65
65
 
@@ -68,25 +68,25 @@
68
68
  Just my implementation of a (reverse) assembler and a simulator for today's insturction set. For part 2 I tried to understand the program but cannot produce desired behavior consistently. Ended up just doing a reverse search which ran very quickly due to low branching factor.
69
69
  :replies: []
70
70
  - :author: iwanttoseeyourcatpls
71
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2k254j/
71
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2k254j
72
72
  :body: |-
73
73
  Once I understood what part 2 was asking for, it worked itself out, but it took me a long time to get to that point. The lightbulb moment for me was realizing that the computer would eat one three-bit-chunk to produce each output, so instead of looking for an integer I really was looking for a string (that represented an integer in base 8)
74
74
 
75
75
  [github](https://github.com/ggggbbybby/aoc2024/blob/master/day17.rb#L135-L160)
76
76
  :replies: []
77
77
  - :author: careyi4
78
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2imo9r/
78
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2imo9r
79
79
  :body: |-
80
80
  Part 2 was very tricky, I didn't have a good instinct on it until I went looking for a hint on the subreddit. I wouldn't have made the mental leap on my own, even after I understood it, coding it took me a little while, I tied myself up in knots thinking about how to match what I had done to the result. Got there in the end, fun puzzle!
81
81
 
82
82
  [https://github.com/careyi3/aoc\_2024/tree/master/solutions/17](https://github.com/careyi3/aoc_2024/tree/master/solutions/17)
83
83
  :replies: []
84
84
  - :author: Stronbold
85
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2h27ko/
85
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2h27ko
86
86
  :body: "[Solution](https://github.com/Alvaro-Kothe/Advent-of-Code/blob/main/2024/day17.rb)"
87
87
  :replies: []
88
88
  - :author: _tfa
89
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2jgi69/
89
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2jgi69
90
90
  :body: |-
91
91
  First brute-forcing the right half of A, then the left one.
92
92
 
@@ -135,7 +135,7 @@
135
135
  ```
136
136
  :replies:
137
137
  - :author: _tfa
138
- :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2k6onx/
138
+ :url: https://www.reddit.com/r/adventofcode/comments/1hg38ah/2024_day_17_solutions/m2k6onx
139
139
  :body: |-
140
140
  Stupid me! Why do I program two loops from 0 to 16777215 when I could do also with 16 loops from 0 to 7? Okay, it's a bit more than that, but now it takes only a few milliseconds...
141
141
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  - :author: FCBStar-of-the-South
3
- :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2qz0ir/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2qz0ir
4
4
  :body: |-
5
5
  [paste](https://topaz.github.io/paste/#XQAAAQB8CgAAAAAAAAA5GUqKNoFH9WVqAtfQAlEIpeJL/pI3jz8l8zNIKbgBcHDkxoKCi/QicVvXncjAUUpHr5KdZkGS65g6AjDBWjmhQNW8xAK3HDD/WikKVUN9CVUuws2wjHNA0gkOrWaunxXGb7F1LN9Mh5X9aKBT4gCSnSL/LmXJUgDHwUcfjeObrm2HC08TifVBY73P2y27+qwFuy6xAQ/tz7dRDfaVpEhcD4AHNF4ZUVHwWIdkktDYSaE7FBpJYg+AfLUIvuJWQ0pRnoqiVZOSuI0xVbxkVLx1meM5iFpbtAgDgsd/Wk3hR4hwGsneHCBb8lHVFXNp5a0wAZ8HxfRipV7xQRw5jHk+LR+3Nyzo+9Ted5oin5K56cB7jRG7vVDt48avyH0rv1rREnsmCv+rLj92PrYmAitWZRwZezqvW1fpLvCXTFMdh+z853tmJmf1pm7vHBs72GAPTtQ0whmls3GVjoA5eXUsr98DOZttwNUVG/WquEOVWILYFTpI8zz2/lkYK+FzljmDLbLsDvnVeGqQtnBp69KsW6nNfnHCKstApuJv1wOm3oytOhQiAlNzPOixIfFvU9ekkVE0ioYca/f21MNhtRYD+TQbBT5iWFS33Sf4m7wn6RNmO6PGFbebSSHWPRiqgQssHvF7a4OQGPn2oYSbtfur4DRukbf5XoXyGxdAAc/JfTWpWnPLnlKwMYJBdrMQdbV3WmKkVvSA/vEwPLrGJvGzsdwkVvhes2dPC5aprhZ1CP2nHOsngFOzNAJUJF1XqcfIbgEwbhOphCvB21DMRnOplX5bsRJtjG0EOIPfxaMYa+iGj8IYgEii5hJzTD5N4/Tm7yhhMgJ7vsAahBrD3PkE0I4I6tPDFdFooM0HxiUReVgOIjrNNDn0h4+Pw5Y0aZ0X4y+nrGCLEgradBwAEKtw6wM7i8EYB5yLbKhi0SWnfTV9BMU2R4VxWWK2Iz6dVA8Gaah01q0szgu+jK2cqCG/XPS+Fg4QY+S2SnFBE8jmiXWbQ7qiRCKkoL3V5qtBytNTmadie3EJ4WzvE2iqZ4f/iY1etPI0/+CP7Dfmq2/muNX0c0a3QM/CnuEaxqcbr6N1birgg3FgEvTw94cU094rpJ0D79u4XM6IZ3Qpiw+otDtvVB0fw7NojydwFVk+kJcBE4IecieHCHfX7mkKWHjNxztLpXm1KzqaHMpg3udDyzxe2ltIkXQQWiCqMuc886HNGZcE/oea2gdjMFxKtClaqha2lDfRIdMtLZK/lET3SDlkSZoFjvnGDZ8hAmlFVgJ+C8IBtoasCWkkvO1Isb4In1cs1ohN8Qo2CCq7RmCJaW/SmK83iOr00COiVIXBW2LSpGjfJpPqHpUEeaPD8tcFjgaLAO1mIXQI3gQm7Z3R6fn+Cu7eQkh9fTb/WGN9kZvyAAUnLP+NgyHhMlLO+o8NUVcYemP3oMz2Zn3MSIJ/i6n//BXjMA==)
6
6
 
7
7
  Just reuse day 16 A\* implementation with a binary search for part 2
8
8
  :replies: []
9
9
  - :author: el_daniero
10
- :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2pkmwq/
10
+ :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2pkmwq
11
11
  :body: |-
12
12
  I thought part 2 was gonna be about making the run while the bytes were falling down (or was it? I'm not sure), so I made a search that allowed stepping on a cell before a byte potentially lands on it. Turns out that wasn't necessary, but at least I could solve part 2 only by adding a few lines without changing any existing lines:
13
13
 
@@ -26,7 +26,7 @@
26
26
  The whole thing here: https://github.com/daniero/code-challenges/blob/master/aoc2024/ruby/18.rb
27
27
  :replies: []
28
28
  - :author: JAntaresN
29
- :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2p22rz/
29
+ :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2p22rz
30
30
  :body: |-
31
31
  [git link](https://github.com/jw-rx-93/advent-of-code-2024/blob/main/day18/day18.rb)
32
32
 
@@ -35,7 +35,7 @@
35
35
  Part 2 reuses the djikstra algorithmn above, and brute f-, nah I am just playing, you can optimize it. Basically when you do djikstra's algo, you can also determine the shortest path that was taken, and store them in a set, and as you iterate through your test data, if the indices don't interfere with your current known path, then you can skip it, and move on to the next until you find one that does. Then simply recalculate and repeat, until you get a measurement where the final node is infinity meaning you never reached it.
36
36
  :replies: []
37
37
  - :author: globalreset
38
- :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2mbzzn/
38
+ :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2mbzzn
39
39
  :body: |-
40
40
  Reused my dijkstra from day 16. And part 2 was a simple binary search.
41
41
 
@@ -58,7 +58,7 @@
58
58
  [github - solution](https://github.com/globalreset/advent_of_code/blob/main/challenges/2024/18/solution.rb)
59
59
  :replies:
60
60
  - :author: iandj1
61
- :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2njxk9/
61
+ :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2njxk9
62
62
  :body: |-
63
63
  I had similar, but used the built-in [binary search function](https://docs.ruby-lang.org/en/master/bsearch_rdoc.html)
64
64
 
@@ -71,11 +71,11 @@
71
71
  ```
72
72
  :replies:
73
73
  - :author: globalreset
74
- :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2ommf1/
74
+ :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2ommf1
75
75
  :body: Nice! Thanks for that! I love all the ruby built-ins and didn’t realize this existed. That’s going in the toolbox.
76
76
  :replies: []
77
77
  - :author: _tfa
78
- :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2mtflo/
78
+ :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2mtflo
79
79
  :body: |-
80
80
  ```ruby
81
81
  input = File.read("input.txt")
@@ -120,14 +120,14 @@
120
120
  ```
121
121
  :replies: []
122
122
  - :author: careyi4
123
- :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2n1l5g/
123
+ :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2n1l5g
124
124
  :body: |-
125
125
  Dijkstra again, and for part 2, 30 seconds worth of manual binary searching!
126
126
 
127
127
  [https://github.com/careyi3/aoc\_2024/tree/master/solutions/18](https://github.com/careyi3/aoc_2024/tree/master/solutions/18)
128
128
  :replies: []
129
129
  - :author: Stronbold
130
- :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2nhy32/
130
+ :url: https://www.reddit.com/r/adventofcode/comments/1hguacy/2024_day_18_solutions/m2nhy32
131
131
  :body: |-
132
132
  [Solution](https://github.com/Alvaro-Kothe/Advent-of-Code/blob/main/2024/day18.rb)
133
133
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: jafuentest
3
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2x6w5g/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2x6w5g
4
4
  :body: |-
5
5
  Filtering down the patterns really helped, specially on part 2, ex:
6
6
 
@@ -9,15 +9,15 @@
9
9
  [Part 1](https://raw.githubusercontent.com/jafuentest/advent-of-code/refs/heads/main/2024/solution-19-1.rb), [Part 2](https://raw.githubusercontent.com/jafuentest/advent-of-code/refs/heads/main/2024/solution-19-2.rb)
10
10
  :replies:
11
11
  - :author: craigontour
12
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m4qoaf6/
12
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m4qoaf6
13
13
  :body: Very impressed with your solution. Had you used it for some other problem before?
14
14
  :replies:
15
15
  - :author: jafuentest
16
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m5rgbud/
16
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m5rgbud
17
17
  :body: Thanks! Filtering usually works to reduce execution time when complexity is quadratic or worse
18
18
  :replies: []
19
19
  - :author: FCBStar-of-the-South
20
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2widl9/
20
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2widl9
21
21
  :body: |-
22
22
  ```ruby
23
23
  input = File.read('input19.txt').split("\n\n")
@@ -44,11 +44,11 @@
44
44
  After writing separate functions for part 1 and part 2 I realized only part 2 is needed to solve both parts. This can probably go faster but the code is already so minimal I don't really see where improvements can be found
45
45
  :replies:
46
46
  - :author: eggselent_folk
47
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2wtil3/
47
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2wtil3
48
48
  :body: "I was stuck because my implementation was trying to seek through the design string back-and-forth, instead of using each towel as the start of the search. I realized the problem is I did not consider the uniqueness of some of the possible arrangements. Just realized this after reading your solution.\n\nNice and well-written. \U0001F44D"
49
49
  :replies: []
50
50
  - :author: JAntaresN
51
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2uyv5y/
51
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2uyv5y
52
52
  :body: |-
53
53
  [day19 git link](https://github.com/jw-rx-93/advent-of-code-2024/blob/main/day19/day19.rb)
54
54
 
@@ -59,7 +59,7 @@
59
59
  Then you drop in your memoization to optimize because you will be encountering repeated patterns of words and indexes.
60
60
  :replies: []
61
61
  - :author: Symbroson
62
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sv7i7/
62
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sv7i7
63
63
  :body: |-
64
64
  golfed both parts: 143 bytes.
65
65
 
@@ -74,7 +74,7 @@
74
74
  ```
75
75
  :replies: []
76
76
  - :author: Mon_Ouie
77
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2s3zyk/
77
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2s3zyk
78
78
  :body: |-
79
79
  Nothing special about the recursive search for part 2, but part 1 was solved using the cute `Regexp.union` method.
80
80
 
@@ -110,7 +110,7 @@
110
110
  ```
111
111
  :replies:
112
112
  - :author: whyrememberpassword
113
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sa7kd/
113
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sa7kd
114
114
  :body: |-
115
115
  yeah this (along with the equivalent python version) doesn't work on my input. here's a minimized test case that breaks your solution
116
116
 
@@ -121,11 +121,11 @@
121
121
  ```
122
122
  :replies: []
123
123
  - :author: globalreset
124
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sbkg8/
124
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sbkg8
125
125
  :body: Nice, that is cute!
126
126
  :replies: []
127
127
  - :author: _tfa
128
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2tfq1q/
128
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2tfq1q
129
129
  :body: |-
130
130
  ```ruby
131
131
  t, p = File.read("input.txt").split("\n\n")
@@ -142,7 +142,7 @@
142
142
  ```
143
143
  :replies: []
144
144
  - :author: globalreset
145
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sc76v/
145
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sc76v
146
146
  :body: |-
147
147
  I'm scared for tomorrow. Part 1, I started off with a simple "select all the patterns that work for the start of the current design, then check if any recursions on the substring after that pattern get us to the end of string". Part 2 was just change the .any? on that second part to .sum and adding memoization so we could complete in reasonable time. I later went back and adjusted my part 1 to use a regex trick that I learned here so hopefully I'll remember it for next time.
148
148
 
@@ -168,11 +168,11 @@
168
168
  ```
169
169
  :replies:
170
170
  - :author: riffraff
171
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sdi3m/
171
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sdi3m
172
172
  :body: ah I love part 1!
173
173
  :replies: []
174
174
  - :author: riffraff
175
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sco2c/
175
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sco2c
176
176
  :body: |-
177
177
  basic recursion and memoization. For some reason the Memoist library has decided not to work at the top level anymore, which I'm sure it did at some time, so I need to define a useless class but eh, it works and solve each part in 1s (could do both together, but I usually don't)
178
178
 
@@ -212,14 +212,14 @@
212
212
  ```
213
213
  :replies: []
214
214
  - :author: careyi4
215
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sxxpi/
215
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2sxxpi
216
216
  :body: |-
217
217
  Straight forward today, I did a recursive solution which finds matches for the start of the string, then chomps off the ones that match from the string and trys again. Part 1, short circuit to return true if it finds any valid combo. Part 2, remove ths short circuit return logic so that we check each path, but add a cache to speed it up.
218
218
 
219
219
  [https://github.com/careyi3/aoc\_2024/tree/master/solutions/19](https://github.com/careyi3/aoc_2024/tree/master/solutions/19)
220
220
  :replies: []
221
221
  - :author: jstanley0
222
- :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2s6hju/
222
+ :url: https://www.reddit.com/r/adventofcode/comments/1hhlb8g/2024_day_19_solutions/m2s6hju
223
223
  :body: |-
224
224
  665/869
225
225
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: eggselent_folk
3
- :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m32h60h/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m32h60h
4
4
  :body: |-
5
5
  Part 1
6
6
 
@@ -16,7 +16,7 @@
16
16
  I tried a similar approach to Part 1, but it was really slow. Then I realized there’s no need to keep running Dijkstra since there’s only one path. Instead, we can just use the path we already have: the savings come from how many grid cells along the path we can skip minus how many we pass by 'cheating' through the wall.
17
17
  :replies: []
18
18
  - :author: JAntaresN
19
- :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m32dmpd/
19
+ :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m32dmpd
20
20
  :body: |-
21
21
  [Day 20 git link](https://github.com/jw-rx-93/advent-of-code-2024/blob/main/day20/day20.rb)
22
22
 
@@ -27,14 +27,14 @@
27
27
  Edit: implemented manhattan distance instead. Learned something today.
28
28
  :replies: []
29
29
  - :author: FCBStar-of-the-South
30
- :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m31r0rz/
30
+ :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m31r0rz
31
31
  :body: |-
32
32
  [paste](https://topaz.github.io/paste/#XQAAAQBSBQAAAAAAAAA5GUqKNoFH9WVqAtfQAlEIpeJL/pI3jz8l8zNIKbgBcDs8fKlEL/CNiVvHcK3eo2f1wG2uFy9c4gJqYPLUFmRQObk0r1ctDG23Tm34gRt6y0eQyY1K3b+i262JFsBcUTwua3DLm6KSkqYEXQeJcnMzX2GiPxLyHJWGSpd1fxuDnJy73MlIlL5A6O9r7sUJc74tEcDpuOSFvnIDUAJroBJOl4///H6DVYUL4ZAWQeDifCTkpGd48wf1XWh8OaloKZi3EBui3TYbf2XczZyUTJ0gCrwy+Vh0acUQfuSoTFGJySKo455BdcpopJKl1y3juBmP7oTORtH9I+4Yc9FW6x16Zu2xxSRUQlgzbf1x9qA59hab7ZSSFhgnpgKR6yEueMsduCcaTE1MrEBvThUWafam677wcu+jaQ0J84QspD7caKAlferv+Cj6YKtb/tS78hON9X62Q3+NBEhKbWgkmSs1PcSSmSWgs42iMkoOr9LXiNfqHCdow+xffrKvSWd3WUHN5tOBn2/PX1R+2MMcMD4wUHU+1P6f5hal6aCciijFQ0qntvI31170SCUg5hBWTqE6dsM1/zVWkIBB/gbB70aKBu3Qy2Agvif5WFB9bkR0kjjnpR6QbiR4KCh90LFncnJON33o5rLoSRAJoAX7OxByKGSgzusOC1JU9xhRYzPFiLQHTI4k/ZRdX6QWrS/VNyt489cJmMbQ6EZXS2aSNxDtXZ0Pm1aQYcpSQwVxg9KYOECireQAH48ATQOjXOAcdn2yBJMFPtw0yGLODKhKxBj/RCss1ZFRDrLxOdeuQTyEAlkxA3LEvUBMmyXOIiv09YUM/5OhmCMOYedljBc2+9RK4+e/rLITQNz/vHkIsQ==)
33
33
 
34
34
  I really don't think today's problem description was very good. Part 1 was clear but I just didn't read carefully. Part 2 sure felt a bit underspecified
35
35
  :replies: []
36
36
  - :author: _tfa
37
- :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m2yun6p/
37
+ :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m2yun6p
38
38
  :body: |-
39
39
  ```ruby
40
40
  start, target, map = nil, nil, Set.new
@@ -74,7 +74,7 @@
74
74
  ```
75
75
  :replies: []
76
76
  - :author: globalreset
77
- :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m2ycfqu/
77
+ :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m2ycfqu
78
78
  :body: |-
79
79
  Advent of the Grid! Quick bfs to get the shortest path. It wasn't immediately obvious to me that there was only one path through, so I wasted time trying to tweak my bfs at first. My find\_path function returns a hash of all the points on the grid and their step counts. For part 1, I went to every point and checked if 1 or 2 steps in any direction would let me short circuit the path. For part 2, this was slow, but worked just changing it to 20 steps in any direction. I cut part 2 down from 7 seconds to 4 by instead testing every point in the grid with every later point to see if it was less than the cheat distance away from the first point. This technique slowed down part 1 quite a bit. I'm curious if anyone found faster solutions.
80
80
 
@@ -94,18 +94,18 @@
94
94
  [github - solution](https://github.com/globalreset/advent_of_code/blob/main/challenges/2024/20/solution.rb)
95
95
  :replies: []
96
96
  - :author: careyi4
97
- :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m2zkao9/
97
+ :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m2zkao9
98
98
  :body: |-
99
99
  Not too bad today, I was surprised that my lazy solution for part 2 worked in a reasonable time. I made a mistake at the start and assumed that there was a third move needed to get you back onto the track and was overcomplicating it, but turned out not to be an issue anyway. Solution is to run dijkstra, then with the known set of visited paths, for each one, see if it is N steps away (through walls) from another visited point on the path who's distance from the start is longer. For part 1 N = 2, for part 2, N = 20. I use a dump 40x40 grid in the second part centered on the point of interst and then calculate all the points that have a manhatten distance of 20 or less as candidates.
100
100
 
101
101
  [https://github.com/careyi3/aoc\_2024/tree/master/solutions/20](https://github.com/careyi3/aoc_2024/tree/master/solutions/20)
102
102
  :replies: []
103
103
  - :author: Stronbold
104
- :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m2zvmsc/
104
+ :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m2zvmsc
105
105
  :body: "[Solution](https://github.com/Alvaro-Kothe/Advent-of-Code/blob/main/2024/day20.rb)"
106
106
  :replies: []
107
107
  - :author: masterarms
108
- :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m2z9o0z/
108
+ :url: https://www.reddit.com/r/adventofcode/comments/1hicdtb/2024_day_20_solutions/m2z9o0z
109
109
  :body: |-
110
110
  For part1 the brute force solution (doing a BFS for every possible cheat pair from the start and the end) correctly finished before I wrote the faster solution for both parts. But it was clear that part2 would take ages.
111
111
 
@@ -1,17 +1,17 @@
1
1
  ---
2
2
  - :author: Stronbold
3
- :url: https://www.reddit.com/r/adventofcode/comments/1hj2odw/2024_day_21_solutions/m3c99gh/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/1hj2odw/2024_day_21_solutions/m3c99gh
4
4
  :body: "[Solution](https://github.com/Alvaro-Kothe/Advent-of-Code/blob/main/2024/day21.rb)"
5
5
  :replies: []
6
6
  - :author: JAntaresN
7
- :url: https://www.reddit.com/r/adventofcode/comments/1hj2odw/2024_day_21_solutions/m38oozv/
7
+ :url: https://www.reddit.com/r/adventofcode/comments/1hj2odw/2024_day_21_solutions/m38oozv
8
8
  :body: |-
9
9
  [git link](https://github.com/jw-rx-93/advent-of-code-2024/blob/main/day21/day21.rb)
10
10
 
11
11
  Struggled hard on this one. Recognized that it was dp problem, but I had issue figuring out what I needed to memoize. I also made a mistake of selecting individual sub sequence by "weighing" them based on the number of movements required, and selecting only one of them. That was a mistake. Weighing them is fine, but all the substrings of the same weight must be accounted for as well, and that took some snooping around here to figure out.
12
12
  :replies: []
13
13
  - :author: NullT3rminated
14
- :url: https://www.reddit.com/r/adventofcode/comments/1hj2odw/2024_day_21_solutions/m33nqyg/
14
+ :url: https://www.reddit.com/r/adventofcode/comments/1hj2odw/2024_day_21_solutions/m33nqyg
15
15
  :body: |-
16
16
  [Language: Ruby 710/223]
17
17
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: FCBStar-of-the-South
3
- :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m3dig7t/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m3dig7t
4
4
  :body: |-
5
5
  Really overcomplicated this on my first attempt and wrote something that took 20s. Significantly refactored and this runs in about 1s which is just fine by me for AoC purposes.
6
6
 
@@ -50,18 +50,18 @@
50
50
  ```
51
51
  :replies: []
52
52
  - :author: Stronbold
53
- :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m3c9pg4/
53
+ :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m3c9pg4
54
54
  :body: "[Solution](https://github.com/Alvaro-Kothe/Advent-of-Code/blob/main/2024/day22.rb)"
55
55
  :replies: []
56
56
  - :author: careyi4
57
- :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m3a99nb/
57
+ :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m3a99nb
58
58
  :body: |-
59
59
  Busy weekend, didn't get day 21 done yet, but happy this one wasn't too bad. For part 2 I generated a hash of all sequences I encountered and stored the values found. Then I summed the matching sequences across each start number, the largest value in the end was the correct answer. Fairly slow, but not optimised at all, can deffinately make it faster. Runs in about 5 seconds for me.
60
60
 
61
61
  [https://github.com/careyi3/aoc\_2024/tree/master/solutions/22](https://github.com/careyi3/aoc_2024/tree/master/solutions/22)
62
62
  :replies: []
63
63
  - :author: JAntaresN
64
- :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m3a2wy5/
64
+ :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m3a2wy5
65
65
  :body: |-
66
66
  [git link](https://github.com/jw-rx-93/advent-of-code-2024/blob/main/day22/day22.rb)
67
67
 
@@ -70,7 +70,7 @@
70
70
  Part 2, I used an inner set to mark sequences I already seen for a number, and it gets processed into a frequency table, which accumulates the price, then it's a simple sort, and pick the last one. There was one mistake I made, and it was that I choose the maximal value a particular sequence is worth for a number, cuz I figure that is the best way to min max, but it turns out the monkey only picks a sequence the first time it appears.
71
71
  :replies: []
72
72
  - :author: Sharparam
73
- :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m38ylua/
73
+ :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m38ylua
74
74
  :body: |-
75
75
  (1352/1270)
76
76
 
@@ -79,7 +79,7 @@
79
79
  Completes both parts in around 43 seconds on my machine, pure brute force. With how easy today was it makes me shiver in fear for the coming two final days before day 25…
80
80
  :replies: []
81
81
  - :author: _tfa
82
- :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m39lq9x/
82
+ :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m39lq9x
83
83
  :body: |-
84
84
  ```ruby
85
85
  input = File.readlines("input.txt").map(&:to_i)
@@ -118,7 +118,7 @@
118
118
  ```
119
119
  :replies: []
120
120
  - :author: birblett
121
- :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m390b32/
121
+ :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m390b32
122
122
  :body: |-
123
123
  ```ruby
124
124
  puts (seq = {}) && File.read("in.txt").split(/\n/).map(&:to_i).sum { |cu, h = {}, last4 = 1048575|
@@ -134,7 +134,7 @@
134
134
  just use the last 4 prices as a key to sum up the results of each individual sequence. used some funky bitwise stuff during key generation to save the overhead of passing entire arrays around as keys. runs in about ~1s on my machine (using truffleruby).
135
135
  :replies: []
136
136
  - :author: yourparadigm
137
- :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m39a4gv/
137
+ :url: https://www.reddit.com/r/adventofcode/comments/1hjroap/2024_day_22_solutions/m39a4gv
138
138
  :body: |-
139
139
  [LANGUAGE: Go]
140
140
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  - :author: False-Expression-985
3
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3i1ax2/
3
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3i1ax2
4
4
  :body: |-
5
5
  Code: [https://github.com/ChrisBrandhorst/adventofcode/blob/master/2024/23/main.rb](https://github.com/ChrisBrandhorst/adventofcode/blob/master/2024/23/main.rb)
6
6
 
@@ -50,7 +50,7 @@
50
50
  The bottom count is equal to the initial entries' `to[].size - 1` (if you include the intersection with itself, you can skip the minus 1). **This only holds for the answer set** , so you can stop after you find the first one (which for me is after just 39 of 3380 input entries).
51
51
  :replies: []
52
52
  - :author: FCBStar-of-the-South
53
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3gwj71/
53
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3gwj71
54
54
  :body: |-
55
55
  [paste](https://topaz.github.io/paste/#XQAAAQB6BQAAAAAAAAARiAlH8dxNBu7dkgwpusw3/1N9B7LsXMI7hyVChWl1ep9IBYPPdblNB+e+LbTiO+aeJ6+cRA4yPOmC7Qaz1eL62nSqw7zBuYzSqTOFQgaI2kIHocSAPLoEezoZhVcCkfVH5FIAQyQU0OcylwJssDkMV0w3PaMNhW6cQTeersZZZUr0mekSjDa8+ZRH9ekQB/LYwBKvIiAdv5FzbvVSy+d5x4vlb1w2z6CBmjFMC2TYZVh2n5N8QIZH7ZQ4zDP0NKCsyjHrXTG3F8VrOdBd6XC3cTTYnD2Fh/H76DmJdLQP94jhhQLXfksvRyAOFNvCInesVrqV4AuJZzY63HPM0/r30G9oLhbLEb/I8O+GnDDFdev26UrYVPg4o2FYAVW5SipZceu1bwUhtiyWNzM+Ij+VgD130gLmfJZDbSMtMJtcbu4ZZtZkhgt+4u/1dNEs7bGM1GqpOpV0mK4HFZCkWSVZCJuxApFU2PlSAYgb3Y+gJqnm1EzczY/15xn0dQD3nujF2Mccg7Qt/AXm7WPL59wIjA+qiTx3A2t7ugnOA7ZGKqVXI7uU3F8A0UeMhNxsGEcLIrlyiOpzmiqnv1dC62nrf7nXPkW+nUbvwsIyYDg9c9dbnwlar7HnGjJCGp+A66MeZOUTnxP5h4EKcrUC7OoEU1qRMMohzBcoXbetm/wW7iZFmYAAoX48j33ks0VECGdbsSQjIpJH2jp+kN04jJiHXcAOqU0QkLkp2AeR676ucv328GMdWGNeKFsXwOrYlhAq+JYG0OFLr58WPeN+aIeHvb5B0Q2/OPobygzzr/Gtl/ufGr73AZ0KqmdcZqq03eYiFBeyvb//VQw0AA==)
56
56
 
@@ -59,18 +59,18 @@
59
59
  For part 2, today I learnt about the [Bron–Kerbosch algorithm](https://en.wikipedia.org/wiki/Bron%E2%80%93Kerbosch_algorithm). Actually a somewhat straight-shot algorithm once you understand it
60
60
  :replies:
61
61
  - :author: ChasmoGER
62
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3him0j/
62
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3him0j
63
63
  :body: Thanks for sharing the algorithm name!
64
64
  :replies: []
65
65
  - :author: careyi4
66
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3gsazr/
66
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3gsazr
67
67
  :body: |-
68
68
  That was fun, did a dumb check every combinations thing for the first part. Then for part 2, I constructed a binary number for each set of points and what it was connected to. I then anded each pair of these sets. A group of connected computers should contain a the same number of computers in common. So by tallying the results of all the ands, you can see the one that occours the most should be the largest number of connected computers.
69
69
 
70
70
  [https://github.com/careyi3/aoc\_2024/tree/master/solutions/23](https://github.com/careyi3/aoc_2024/tree/master/solutions/23)
71
71
  :replies: []
72
72
  - :author: JAntaresN
73
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3gkxv7/
73
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3gkxv7
74
74
  :body: |-
75
75
  [git link](https://github.com/jw-rx-93/advent-of-code-2024/blob/main/day23/day23.rb)
76
76
 
@@ -81,7 +81,7 @@
81
81
  Overall, alot easier than I thought it would be cuz when I did the first part, I had expected another memoization slog fest like a few days ago.
82
82
  :replies: []
83
83
  - :author: el_daniero
84
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3gd7b0/
84
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3gd7b0
85
85
  :body: |-
86
86
  ```ruby
87
87
  require 'set'
@@ -115,11 +115,11 @@
115
115
  ```
116
116
  :replies: []
117
117
  - :author: Stronbold
118
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3fy0wg/
118
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3fy0wg
119
119
  :body: "[Solution](https://github.com/Alvaro-Kothe/Advent-of-Code/blob/main/2024/day23.rb)"
120
120
  :replies: []
121
121
  - :author: _tfa
122
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3fxw3m/
122
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3fxw3m
123
123
  :body: |-
124
124
  Nothing special here. Runs in ~ 100ms
125
125
 
@@ -155,7 +155,7 @@
155
155
  ```
156
156
  :replies: []
157
157
  - :author: yourparadigm
158
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3ee1s7/
158
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3ee1s7
159
159
  :body: |-
160
160
  851/1863
161
161
 
@@ -164,7 +164,7 @@
164
164
  [paste](https://topaz.github.io/paste/#XQAAAQB1BQAAAAAAAAARiEJHiiMzw3cPM/1Vl+2nyBa63n8Kw6AjPxo/gbHVfkb/lFqEN/cVLFFRr5hB8At2Ya6RvYvxrcrj9+/hWpyd2xTGLsezZSupxlbZ8zenEPWJeoe7/CshYyiqEEaTOm7lLuqxNFbbIMrN7ugc9qoSceYRu1lQzsT4BsDnLd6zxO0da4l73kExIxHwmjktTM4qNlMhR2mhfRkuOVHu4qnDnt6xGkT7/jjpUvk+yRqvP5ijERekL+j9DBL44H/1L8a8fiupGXI/pzcSWoPv+F2geLy0M81z9UX4obpEPiIyQWPEJ50gWwLXaQSZm5ELexB8ciciGRcQ5nedFd12DJck3atWOGk6MOYQi6H9brjxpRVwr0XWP+AFdetJbUbZXA6UkfIagBn1ioXgjPd4OGfqg1207D4k5uhSPyGFo+2EG65qPsPKt+Vq6lAN+a6htIwz92yEQU4bTtgbwohEnAG660Grc1UhpYyR8xgV93c4sIg2mrXD+TkNxdE3DMFXdKOaJqAD/ubmwUEsZrIZbGLgcpqzYrkhC6tfSa1KeXkGxs7N7Z8QLmop8V9ZAmaYY0SKT7VPN3yTM/gEifrxpW/WGN+zT6g5lwyUYVjFmHAuzbcxOqOAfASlVR044i+kC+9MFPL2e6z996vwJVl2EQIq5IJ0UeMhyx81CdjBacMjeF676MKd3y51ToIPFAVqDVAsWtPOLuAi8wIYAgZovrdWV7oDP0gHXja3H/+Y0b16)
165
165
  :replies: []
166
166
  - :author: globalreset
167
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3ekc9i/
167
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3ekc9i
168
168
  :body: |-
169
169
  I just recursively tried to build the largest group I could starting with the beginning network of each node. Runtime was longer than I could wait so started looking for speedups. My biggest speedup was maintaining a running max and skipping over nodes whose starting network was smaller than my current max group. Still only got it down to 1.6s so I want to play around with better algorithms.
170
170
 
@@ -196,7 +196,7 @@
196
196
  ```
197
197
  :replies: []
198
198
  - :author: Mon_Ouie
199
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3eqwj1/
199
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3eqwj1
200
200
  :body: |-
201
201
  Just for reference, the basic DFS search for a maximum clique seems to have first been described by [Carraghan and Pardalos (1990)](https://www.sciencedirect.com/science/article/abs/pii/016763779090057C). It includes a pruning step that some solutions here don't have (you can backtrack early if the current clique combined with all vertices that can extend it would still not be bigger than the current best clique). The inputs are easy enough that you don't even need this.
202
202
 
@@ -247,10 +247,10 @@
247
247
  ```
248
248
  :replies:
249
249
  - :author: "[deleted]"
250
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3eqwj9/
250
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3eqwj9
251
251
  :body: "[removed]"
252
252
  :replies:
253
253
  - :author: Mon_Ouie
254
- :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3er960/
254
+ :url: https://www.reddit.com/r/adventofcode/comments/1hkgj5b/2024_day_23_solutions/m3er960
255
255
  :body: Why is this case sensitive though?
256
256
  :replies: []