I’ve been going along in rust this year, but graph...
# advent-of-code
j
I’ve been going along in rust this year, but graphs are hard in rust, so I’m considering doing kotlin for day 6.
a
Can you not just use Rust's Vectors & HashMaps to model the relationships?
j
It’s nontrivial to do it by creating adjacency lists made of references
Because of the ownership and borrowing semantics of the language
a
Ok
j
If A owns B, B cant own A
The way to do it without pulling out your hair is to store edges as indices into a vec
g
I'm also doing rust, but before kind of considered taking the best fitted language for the problem. However I'm gonna give it a try anyway