Oh gosh, that's giving me flashbacks to one of my third semester computer science classes at college (Intro to C and Compiler Design).
One of the very early assignments was creating a red-black tree. Thankfully I was already pretty familiar with C, but I don't think that was true for anyone else in class... totally super didn't scar me or anyone else.
... and I literally only just now got the joke, oops 😅 if only we could all be left-leaning red-black trees
am now thinking maybe the minus sign should be interpreted literally. like maybe there is some invariant involving the number of red nodes minus the number of black nodes along some path or within some group of nodes. not sure what that invariant would be though
9 Comments
ChrysanthemumIndica@discuss.tchncs.de · 40 pts · 293d
Oh gosh, that's giving me flashbacks to one of my third semester computer science classes at college (Intro to C and Compiler Design).
One of the very early assignments was creating a red-black tree. Thankfully I was already pretty familiar with C, but I don't think that was true for anyone else in class... totally super didn't scar me or anyone else.
... and I literally only just now got the joke, oops 😅 if only we could all be left-leaning red-black trees
cassandrafatigue@lemmy.dbzer0.com · 4 pts · 292d
Not interested in being a tree at this point in my life tbh.
QuantumTickle@lemmy.zip · 20 pts · 293d
For the curious:
https://en.wikipedia.org/wiki/Left-leaning_red%E2%80%93black_tree
BB84@mander.xyz · 22 pts · 293d
Interesting that this article title has a dash for left-leaning and a minus sign for red–black
QuantumTickle@lemmy.zip · 11 pts · 292d
I know there's rules for when to use which. I'm not surprised that Wikipedia would care. I can't keep them straight though.
BB84@mander.xyz · 2 pts · 292d
am now thinking maybe the minus sign should be interpreted literally. like maybe there is some invariant involving the number of red nodes minus the number of black nodes along some path or within some group of nodes. not sure what that invariant would be though
menas@lemmy.wtf · 4 pts · 292d
Saganaki@lemmy.zip · 7 pts · 292d
Looked at Sedgewick’s history.
His dissertation was… “Quicksort”
Holy hell.
pewgar_seemsimandroid@lemmy.blahaj.zone · 3 pts · 292d
HOI4?