Commit Graph
100 Commits
Author SHA1 Message Date
Kharec 81be03e8ee chore: add 2015D8 dataset 2025-12-02 19:54:54 +01:00
Kharec d662f693b8 feat: don't bruteforce every number, use recursion to generate patterns to look for 2025-12-02 18:09:45 +01:00
Kharec b0d16b1bac git: add .test files to ignore 2025-12-02 11:51:21 +01:00
Kharec 3eb9120dc3 clean: remove test file 2025-12-02 11:50:40 +01:00
Kharec 85ae14acbf docs: update readme 2025-12-02 09:58:52 +01:00
Kharec b7a98033c6 refactor: use package aggregators 2025-12-02 09:51:34 +01:00
Kharec 8f265eae05 feat: add per-year aggregator packages so main.go remains readable 2025-12-02 09:51:21 +01:00
Kharec fe20a0b654 feat: solve part two using a bit of bruteforce 2025-12-02 07:48:48 +01:00
Kharec aa80e4eb8e revert: remove useless helper as PartOne and PartTwo will have a different behavior 2025-12-02 07:35:50 +01:00
Kharec 0d029f2861 feat: unify invalid checks with exactTwo boolean parameter 2025-12-02 07:19:57 +01:00
Kharec edf94432f4 test: add unit test for part two 2025-12-02 06:53:45 +01:00
Kharec 33552358f8 feat: solve p1 2025-12-02 06:52:30 +01:00
Kharec 45d3e93a93 test: add unit test for p1 2025-12-02 06:46:42 +01:00
Kharec 707f34e706 feat: include 2025D2 2025-12-02 06:36:56 +01:00
Kharec a05450c73a chore: add 2025D2 dataset 2025-12-02 06:27:22 +01:00
Kharec 6b95f5ced0 test: add an almost arbitrary test for p2 2025-12-01 23:20:37 +01:00
Kharec 9caee546f0 feat: solve part two by overriding wire b and re-evaluating circuit 2025-12-01 23:11:41 +01:00
Kharec 8e831d85fe fix: replace Split with SplitSeq as it's a loop (thanks lsp) 2025-12-01 23:09:30 +01:00
Kharec b8ab5fae7b test: updateInput to simulate new ParseInput output 2025-12-01 23:08:22 +01:00
Kharec 3262d1cbb8 refactor: build instruction in ParseInput and add evaluateWire helper 2025-12-01 23:07:29 +01:00
Kharec 766ee97dd3 feat: solve part one using recursion and memoization 2025-12-01 22:59:28 +01:00
Kharec c41c96e628 test: add unit test for p1, based on manual calculations 2025-12-01 22:59:05 +01:00
Kharec fb46fceb75 refactor: just moving code here and there 2025-12-01 22:48:56 +01:00
Kharec c9fe217e4b feat: include 2015D7 2025-12-01 22:44:45 +01:00
Kharec d88d64edd4 chore: 2015D7 dataset 2025-12-01 22:43:24 +01:00
Kharec e81194721c refactoring: just better naming 2025-12-01 21:53:50 +01:00
Kharec a680e0ba48 refactor: create parseInstruction and instruction{} to use it in both parts 2025-12-01 21:31:51 +01:00
Kharec 345defec4d feat: solve p2 2025-12-01 21:28:27 +01:00
Kharec 3756279dab test: add unit test for p2 2025-12-01 20:52:57 +01:00
Kharec 70189f4295 feat: solve part one 2025-12-01 20:47:02 +01:00
Kharec cdacf7ae06 test: add unit test for p1 from paper calculation 2025-12-01 20:46:55 +01:00
Kharec 074c762960 feat: add 2015D6 dataset 2025-12-01 20:35:08 +01:00
Kharec 6babf31a20 feat: include 2015D6 2025-12-01 20:35:00 +01:00
Kharec cdefd68320 feat: add 2018D3 dataset 2025-12-01 20:09:37 +01:00
Kharec f28611a7bf test: add unit tests for p1/p2 2025-12-01 20:09:29 +01:00
Kharec f98034b00c feat: solve both parts 2025-12-01 20:09:20 +01:00
Kharec 375b756718 feat: include 2018D3 2025-12-01 20:09:12 +01:00
Kharec 6668e8ae1b fix: remove empty branch 2025-12-01 19:37:28 +01:00
Kharec e58959778a docs: update readme 2025-12-01 19:36:25 +01:00
Kharec eb72fe9ebd build: get rid of "new" target 2025-12-01 19:35:01 +01:00
Kharec e355423675 feat: automatically download each day input 2025-12-01 19:32:01 +01:00
Kharec b1be29c21c feat: solve part two using modular arithmetic 2025-12-01 12:35:20 +01:00
Kharec b04dcc5aea test: add P2 unit test 2025-12-01 12:20:11 +01:00
Kharec 11b6227d0e feat: add P1 solution 2025-12-01 12:19:01 +01:00
Kharec 31660c7510 test: add P1 unit test 2025-12-01 12:18:54 +01:00
Kharec 728bbb2a06 feat: add input for 2022D2 2025-12-01 12:18:42 +01:00
Kharec 16a99ba8d8 feat: include 2022D2 2025-12-01 12:18:36 +01:00
Kharec 0949840317 feat: solve P2, same as P1 but check every time the dial passes through 0 during the rotation 2025-12-01 07:41:50 +01:00
Kharec daec5a8671 test: add unit test for p2 2025-12-01 07:35:03 +01:00
Kharec d66cd1179d feat: solve P1 using modulo to keep it between boundaries 2025-12-01 07:31:15 +01:00
Kharec 2d3828c55d test: design unit test for part one 2025-12-01 07:20:12 +01:00
Kharec b7a7bfb5c7 feat: add 2025D1 input 2025-12-01 07:20:01 +01:00
Kharec be918bdf6c feat: include 2025D1 let's gooooo 2025-12-01 07:19:55 +01:00
Kharec c8517b674f docs: explain the string answers trick 2025-11-30 13:35:55 +01:00
Kharec f3d73b7c4b feat: P2 solution using pairwise comparison 2025-11-30 13:08:46 +01:00
Kharec bcef8844ec build: only test internal/ 2025-11-30 13:04:18 +01:00
Kharec 20ab5fe4e5 test: adapted p2 test as it expects string and not int 2025-11-30 13:04:08 +01:00
Kharec 959c05b769 feat: add part one solution 2025-11-30 12:55:52 +01:00
Kharec 4179c88afb feat: include 2018D2 2025-11-30 12:50:47 +01:00
Kharec 0dc0c3af3d feat: 2018D2 dataset 2025-11-30 12:50:41 +01:00
Kharec c6dc950d3f test: add unit test for p1 2025-11-30 12:50:33 +01:00
Kharec e5a1504f6b feat: add solutions for P1/P2 2018D1 2025-11-30 12:46:09 +01:00
Kharec 9da1fa02c8 feat: 2018D1 dataset 2025-11-30 12:46:01 +01:00
Kharec 99857d8ca5 test: add unit tests for P1/P2 2025-11-30 12:45:53 +01:00
Kharec e198caf1b9 feat: include 2018D1 2025-11-30 12:45:45 +01:00
Kharec 9dd5f1354f docs: comment years 2025-11-29 16:15:14 +01:00
Kharec 8ad1b166f3 feat: add both solutions 2025-11-29 16:07:02 +01:00
Kharec 1f3b42b266 feat: 2015D5 dataset 2025-11-29 16:06:54 +01:00
Kharec 9521677ca8 test: add unit tests for both parts 2025-11-29 16:06:42 +01:00
Kharec 8938992384 feat: include 2015D5 2025-11-29 16:06:34 +01:00
Kharec a0ce63e5a5 feat: solve d4 both parts using md5 bruteforce 2025-11-29 09:57:54 +01:00
Kharec a12c8df252 test: add unit tests for both parts 2025-11-29 09:57:23 +01:00
Kharec 8d69f10924 feat: include 2015D4 2025-11-29 09:55:47 +01:00
Kharec e41d1fa220 feat: add 2015D4 input 2025-11-29 09:55:39 +01:00
Kharec da78d01d9f test: standardization 2025-11-29 09:39:33 +01:00
Kharec ff4b7b281c feat: add p2 solution 2025-11-28 17:59:03 +01:00
Kharec a3f54530f6 test: add unit test for p2 2025-11-28 17:56:35 +01:00
Kharec 301d93157c feat: add part one solution 2025-11-28 17:51:51 +01:00
Kharec 7e0a1e71a7 test: add unit test for p1 2025-11-28 17:51:10 +01:00
Kharec 962bc923f3 feat: include 2015D3 2025-11-28 17:50:59 +01:00
Kharec 76568a801d feat: add input for 2015D3 2025-11-28 17:50:29 +01:00
Kharec 1f5b8247a9 feat: add p2 solution 2025-11-28 16:47:56 +01:00
Kharec 950eec898e test: add p2 unit test 2025-11-28 16:47:52 +01:00
Kharec 2d6c89d7c9 feat: add solution for p1 2025-11-28 16:45:04 +01:00
Kharec 6bc4c1b5a5 test: add unit test for p1 2025-11-28 16:44:58 +01:00
Kharec 7b0ccf8a40 feat: add 2015D2 input 2025-11-28 16:41:58 +01:00
Kharec ea62c2ce0a feat: include 2015D2 2025-11-28 16:41:46 +01:00
Kharec 87a7dee129 feat: add solution for p2 2025-11-28 16:31:02 +01:00
Kharec 53d72ae163 test: add unit test for p2 2025-11-28 16:29:35 +01:00
Kharec bd8c2cca31 feat: add day1 part 1 solution 2025-11-28 16:28:15 +01:00
Kharec 4013ad8330 feat: add d1 input 2025-11-28 16:28:01 +01:00
Kharec a344eef0e3 test: add unit test for p1 2025-11-28 16:27:55 +01:00
Kharec 824eb6d5a2 feat: include 2015D1 2025-11-28 16:27:49 +01:00
Kharec d8e7573204 build: add a new target to create files for a new day 2025-11-28 16:22:11 +01:00
Kharec 98fb052039 feat: add p2 solution 2025-11-28 15:33:23 +01:00
Kharec db685a1290 test: add p2 unit test 2025-11-28 15:26:30 +01:00
Kharec 27a56dc7cd refactor: create a execute() function to reuse in part two 2025-11-28 15:26:23 +01:00
Kharec 6a82336c99 feat: add part one solution 2025-11-28 14:54:29 +01:00
Kharec 90a924e640 feat: input for 2020D8 2025-11-28 14:54:21 +01:00
Kharec 228d8b475b test: add unit test for part one 2025-11-28 14:54:16 +01:00