I got `LinkedList` with `listIterator()` to work. ...
# advent-of-code
f
I got
LinkedList
with
listIterator()
to work. Quite simple to make it circular. Took some debugging to get the off-by-one cases right. https://github.com/fdlk/advent-2018/blob/5093cbd1006f017b9400a25a27c58a2feec6358a/src/main/kotlin/nl/kelpin/fleur/advent2018/Day09.kt
k
Congratulations!
I couldn't handle
LinkedList
😠
f
I'm still new to Kotlin, trying to get some experience using advent of code
Lost a lot of time cause I'd written something like
scores[currentElf] = scores[currentElf] ?: 0 + increment
and the ?: turns out to bind very very weakly
k
Yeah I've been bitten by that a couple of times too.