f3b7ead65b
day(24): refactor the modular arithmetics
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-07 13:31:44 +02:00
ad42be0cb7
day(19): add solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-06 20:59:36 +02:00
94a5b006aa
day(22): use proper ranges instead of butchering vectors
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-06 19:09:23 +02:00
f237ebc936
day(22): switch to proper vectors
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-06 19:09:23 +02:00
ba28cdf340
day(22): factor out common parts of solver
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-06 19:09:23 +02:00
fcdff3c129
day(22): factor out wrapping to a trait
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-06 19:09:23 +02:00
775ee061d5
day(22): add part 1
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-06 19:09:23 +02:00
43c39a3ec0
lib: implement column iterator
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-06 19:09:21 +02:00
c14c785355
day(16): add solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-05 12:34:45 +02:00
f93a8db8f9
day(17): add solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-05 12:34:45 +02:00
f72e98c586
day(24): add solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-05 12:34:45 +02:00
113e927a65
day(24): implement min heap
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-05 12:34:44 +02:00
0a7aea65e1
day(23): introduce a helper function for DRY
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-02 23:13:08 +02:00
ff519603f6
day(23): refactor execution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-02 23:12:54 +02:00
b49833f6f5
day(23): remove unnecessary debug and empty lines
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-02 23:12:26 +02:00
f4e86f27ae
chore: update dependencies
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-02 22:59:02 +02:00
ebe39683c7
day(21): add solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-02 22:55:51 +02:00
05f9ffa320
day(18): refactor a bit
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-07 20:09:35 +01:00
06243918fc
vectors: return value instead of reference
...
There was no use-case for returning reference rather than a value and
in majority of case the dereference was needed.
When using 2D/3D vectors, they are mostly initialized with the numbers
and it is contraproductive to pass around references to numbers as they
are more expensive than the copies.
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-07 20:09:35 +01:00
f151a9a785
day(25): sprinkle in some traits
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-07 20:09:34 +01:00
38a2440438
day(25): add initial solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-07 16:42:18 +01:00
89a9758e64
day(18): add solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-07 16:19:37 +01:00
ca5174b41e
vectors: factor out and implement 3D vector
...
• factor out the vectors to separate module
• implement ‹Vector3D›
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-07 16:18:42 +01:00
0cd41d53df
day(23): add solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-07 12:32:06 +01:00
4fe0d4d891
day(20): add solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-07 12:30:28 +01:00
08246225fb
refactor: publicly use common types/macros in solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-06 20:00:52 +01:00
c087e388ac
day(15): add solution
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-03 22:16:21 +01:00
f7840f5eae
day(02): reformat
...
have no clue what changed…
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-03 22:14:49 +01:00
99398e0dae
day(12): fix clippy remark
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-03 22:14:19 +01:00
9aa15bbf6f
vector2d: Implement ‹Index› and ‹IndexMut› traits
...
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-01-03 22:10:26 +01:00
cdd4087cd6
vector2d: refactor ‹in_range›
2022-12-30 12:11:56 +01:00
b02e7207ac
vector2d: refactor indexing
2022-12-30 12:11:41 +01:00
37a4fca618
day(14): refactor based on Google Chat suggestions
...
• get rid of the ‹lines›
• simplify free falling check
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-14 17:13:11 +01:00
2ac9103fe2
day(14): refactor
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-14 15:47:56 +01:00
6789a40038
day(14): add initial solution
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-14 15:36:29 +01:00
bf8c4ddc67
vector2d: use slice instead of Vec
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-14 15:35:56 +01:00
7f7dffe686
day(13): add initial solution
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-13 16:30:54 +01:00
6beaf1606c
day(12): refactor
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-12 10:47:56 +01:00
ce35175ccb
day(12): add initial solution
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-12 10:31:14 +01:00
fabef3ee41
vector2d: fix a silly typo
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-12 10:30:39 +01:00
837a579827
day(11): refactor simulation
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-11 14:27:03 +01:00
d56154f5c2
day(11): refactor parsing
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-11 14:23:02 +01:00
585e27eed9
day(11): add initial solution
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-11 13:43:05 +01:00
9ff562eef9
solution: allow running sample as binary
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-11 13:42:17 +01:00
1b3394fd94
day(10): refactor a bit more
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-10 14:08:28 +01:00
6afe8c41cc
day(10): refactor and fix tests
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-10 13:38:16 +01:00
357888e311
day(10): add initial solution
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-10 12:51:01 +01:00
f1c4785890
day(09): refactor
...
• Implement ‹new› for ‹Instruction›
• Pass ‹visited› instead of returning and consuming
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-09 12:20:29 +01:00
d7d3a8f889
day(09): add initial solution
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-09 12:16:10 +01:00
3219400a73
vector2d: implement subtraction of vectors
...
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-12-09 12:15:40 +01:00