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
First line efficiency: 😁
First line readability: 🗿
It's that time of year again! Nice straightforward puzzle to kick things off.
You are really good. Explaining what you did here with list, map, zip etc is worth an entire video
THE GOAT IS BACK 👑👑👑
love your solution
Welcome baaaaack!
my goat is back!!!!
yay, youtube finally starting to understand what I want in my feed
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
Glad to see you back for another round of Advent of Code 🤩
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