One small question. For the second part, wouldn't it be better to create a frequency dictionary of the lists or using a collections.Counter? That way you only loop over each list once, while in this solution, by calling r.count(x), you are looping over the right list for each element in the left list.
this is true - in future videos i may discuss optimizations, but this is not worth the effort at this input size when the win condition is how fast you get your answer as opposed to how fast your code is
it is, i am just referring to the global leaderboard which is the only semblance of win condition it has. you are, of course, completely welcome to ignore it and i would recommend that for beginners, but i don't because i am competing for it (at least i have been in the past few years, not sure how long i will keep caring about it)
First line efficiency: 😁
First line readability: 🗿
You are really good. Explaining what you did here with list, map, zip etc is worth an entire video
THE GOAT IS BACK 👑👑👑
It's that time of year again! Nice straightforward puzzle to kick things off.
love your solution
yay, youtube finally starting to understand what I want in my feed
my goat is back!!!!
Welcome baaaaack!
Glad to see you back for another round of Advent of Code 🤩
One small question. For the second part, wouldn't it be better to create a frequency dictionary of the lists or using a collections.Counter? That way you only loop over each list once, while in this solution, by calling r.count(x), you are looping over the right list for each element in the left list.
this is true - in future videos i may discuss optimizations, but this is not worth the effort at this input size when the win condition is how fast you get your answer as opposed to how fast your code is
@@hyper-neutrino AoC has a win condition? wth? I thought it was nice small problems we could challenge ourselves with.
it is, i am just referring to the global leaderboard which is the only semblance of win condition it has. you are, of course, completely welcome to ignore it and i would recommend that for beginners, but i don't because i am competing for it (at least i have been in the past few years, not sure how long i will keep caring about it)
That was a fun easy one... I hope it won't get deranged like last year's lol
You should do it in C so you can actually write the code yourself instead of calling 16 functions
i mean i could but the whole point is to solve the problem fastest lol