1
0
Fork 0
Commit graph

53 commits

Author SHA1 Message Date
c4afd4b86d
day(22): add solution for part 1
- also start introducing idea of cubes instead of points

Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-22 12:29:45 +01:00
1c09b90255
day(21): add sources
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-21 20:27:24 +01:00
dacc2a2c37
chore: ignore input files
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-21 20:26:53 +01:00
e0d7e4de13 day(17): refactor
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-20 17:45:42 +01:00
56de6f7110 day(20): refactor
• move ‹square› to ‹Point›
• factor out range construction
• convert ‹TrenchMap.print› into ‹TrenchMap.toString›
• use ‹reduce› instead of ‹fold› in ‹TrenchMap.toIndex›
• factor out iterative enhancement

Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-20 11:40:50 +01:00
186a70f34d day(20): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-20 10:33:22 +01:00
b5718fdb3b day(19): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-19 17:37:36 +01:00
3701f6ffdf day(18): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-18 23:40:21 +01:00
90e1bfc107 day(17): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-18 23:38:58 +01:00
1f8d32f78c day(16): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-16 10:37:53 +01:00
6b17fef240 day(15): move Dijkstra to separate class
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-15 11:36:29 +01:00
acf453d45e day(15): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-15 10:56:32 +01:00
01bf675081 day(14): refactor
do not keep separate functions for the same functionality
with different count of steps

Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-14 14:48:33 +01:00
bd4b174df9 day(14): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-14 14:45:47 +01:00
03a4ebbdca day(13): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-13 12:06:41 +01:00
a415bf279e day(12): keep only count
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-12 13:53:09 +01:00
3203126dad day(12): follow DRY
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-12 10:07:23 +01:00
4d99c4d6d9 day(12): remove redundant helper function
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-12 10:04:47 +01:00
96cbf099f7 day(12): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-12 10:03:01 +01:00
f4466c9a88 day(11): refactor some more
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-11 21:02:55 +01:00
dbc8b26446 day(11): refactor
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-11 20:57:57 +01:00
20016a3582 day(11): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-11 12:39:56 +01:00
5a2ca59ee1 day(10): reformat and refactor
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-10 06:42:35 +01:00
91e5a765ec day(10): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-10 06:29:11 +01:00
c4a4408505 day(09): remove lambda from fold
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-09 13:25:52 +01:00
1cfee94e2a day(09): refactor
- introduce ‹validAdjacentIndices›
- clean up DFS
- remove debugging println
- fix bug of mapping over values instead of indices

Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-09 06:46:32 +01:00
28f318fbed day(09): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-09 06:30:44 +01:00
a06cc306b8 day(08): reformat
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-09 00:09:28 +01:00
6bfe301f7b day(08): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-08 12:29:02 +01:00
cc6d212454 chore: reorganize files once again
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-07 21:42:37 +01:00
f3b014b06c day(07): remove brute force
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-07 13:22:17 +01:00
a92bf3b96f day(07): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-07 11:10:52 +01:00
238df0614e day(06): add missing inputs
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-06 20:10:14 +01:00
eb3803e942 day(06): do not recreate list every time
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-06 11:16:18 +01:00
0df8adcc08 day(06): make it functional
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-06 10:37:13 +01:00
d7cde13a2e day(06): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-06 10:35:12 +01:00
1f6867dc98 day(05): switch to constant
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-06 10:34:59 +01:00
67a18e2687 day(05): fix DRY
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-05 11:42:13 +01:00
0492a86f08 day(05): introduce helper for creating range
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-05 11:25:04 +01:00
19ee5441e5 day(05): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-05 11:23:37 +01:00
f7ea52c685 day(04): clean up and remove todo
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-05 11:23:15 +01:00
2d4eb2b19e day(04): simplify
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-04 16:24:26 +01:00
47f865d9aa day(03): refactor
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-04 15:57:28 +01:00
91aa2e41b7 day(02): refactor
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-04 15:54:39 +01:00
e3e721b6b4 day(01): refactor part 2
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-04 15:52:53 +01:00
4186cf4815 day(01): remove function body
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-04 15:52:53 +01:00
2c3be983dd chore: reorganize inputs
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-04 15:52:46 +01:00
5485bf27b7 day(04): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-04 14:21:56 +01:00
5b448e201e day(03): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-04 14:21:34 +01:00
e8673460a2 day(02): add solution
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-12-04 14:03:27 +01:00