Advent of Code 2024 | Day 23 "LAN Party"

  Рет қаралды 1,991

HyperNeutrino

HyperNeutrino

Күн бұрын

Пікірлер: 12
@hyper-neutrino
@hyper-neutrino 22 күн бұрын
thanks for some people for pointing out an error in this video: symmetric difference (XOR) for sets is A\B union B\A, not intersection. the intersection would be empty. thanks to hyro in my discord server for this correction and also @michalbalcerek4442 in the comments!
@Meezounay
@Meezounay 22 сағат бұрын
Your mind is so fast, hopefully with enough practice, I will get there ! I just solved it today, and learned the word Clique doing so. Keep up the good work ! Thank you
@rastislavsvoboda4363
@rastislavsvoboda4363 22 күн бұрын
nice ;-) @15:16 conns = defaultdict(set) names are string, you can use compare to eliminate multiple counting if x < y < z and x in conns[z] ...
@rubenverg
@rubenverg 22 күн бұрын
symdiff in maths is an up-pointing triangle/uppercase delta
@la3sh
@la3sh 22 күн бұрын
And it's a union/sum not intersection as in the video, as the intersection of A\B and B\A is empty. AΔB = (A\B) u (B\A).
@Volganian
@Volganian 22 күн бұрын
My main language is PHP. After watching yours and other aoc-solvers' videos, I was really impressed by Python's data structures. So I did a very short research and found that PHP has a very neat basic extension for data structures: it has deque, set, queue, stack and so on, and those are properly implemented (and there's union and intersect for sets as well). It seems that having a single flexible hashmap-like data structure instead of an array is good enough for most PHP use cases, but it's nice to have a real tools in case if you know what to do with them.
@reeree519
@reeree519 22 күн бұрын
The part2 is a pretty dumb problem. There is even a specific algorithm for it(Maximal Clique - Bron-Kerbosch Algorithm). Straight up a textbook problem. Idk that it exist tho. So it takes me awhile to come up with a solution. Abusing the fact that each node don't have that many neighbour. You don't even need to modify anything. Can just straight up copy paste the algorithm and auto solve. It was a reasonably nice problem if u don't know it exist. I mean it was solvable without needing to be a genius or knowing it exist. I kinda hope they stop asking a textbook problem. At least make it a part of small move to solve actual problem or required some modification instead of copy+paste+auto_solved. But it's not really a bad thing. I mean I learned something new. That's matter more than anything. But it's not that good for people who are competing for rank(not me so , it's whatever). Also GPT are very good at textbook/standard problem lol!
@MizardXYT
@MizardXYT 22 күн бұрын
You could do ``` req.add(neighbor) search(neighbor, req) req.remove(neighbor) ``` without copying the set.
Advent of Code 2024 | Day 25 "Code Chronicle"
17:56
HyperNeutrino
Рет қаралды 1,4 М.
Advent of Code 2024 | Day 24 "Crossed Wires"
58:52
HyperNeutrino
Рет қаралды 3,4 М.
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН
Как Ходили родители в ШКОЛУ!
0:49
Family Box
Рет қаралды 2,3 МЛН
one year of studying (it was a mistake)
12:51
Jeffrey Codes
Рет қаралды 163 М.
Stop using std::vector wrong
23:14
The Cherno
Рет қаралды 164 М.
Keynote: Advent of Code, Behind the Scenes - Eric Wastl
46:01
Advent of Code 2024 | Day 22 "Monkey Market"
32:34
HyperNeutrino
Рет қаралды 1,7 М.
Catching up with async Rust
17:55
fasterthanlime
Рет қаралды 28 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
5 deadly Rust anti-patterns to avoid
13:25
Let's Get Rusty
Рет қаралды 38 М.
C++ Weekly - Ep 460 - Why is GCC Better Than Clang?
17:31
C++ Weekly With Jason Turner
Рет қаралды 22 М.