lil_shi@programming.dev to Programming@programming.dev · 2 days agoWhat are some cool and obscure data structure you know of?message-squaremessage-square50fedilinkarrow-up1142arrow-down10
arrow-up1142arrow-down1message-squareWhat are some cool and obscure data structure you know of?lil_shi@programming.dev to Programming@programming.dev · 2 days agomessage-square50fedilink
minus-squareAtlas_@lemmy.worldlinkfedilinkarrow-up6·20 hours agoFibonacci heaps are pretty cool. Not used very often b/c they’re awful to implement, but better complexity than many other heaps. Also Binary Lifting is closer to an algorithm than a data structure but it’s used in Competitive Programming a fair bit, and isn’t often taught: https://cp-algorithms.com/graph/lca_binary_lifting.html And again closer to an algo tham a data structure, but Sum over Subsets DP in 3^n also has a cool little bit of math in it: https://cp-algorithms.com/algebra/all-submasks.html
Fibonacci heaps are pretty cool. Not used very often b/c they’re awful to implement, but better complexity than many other heaps.
Also Binary Lifting is closer to an algorithm than a data structure but it’s used in Competitive Programming a fair bit, and isn’t often taught: https://cp-algorithms.com/graph/lca_binary_lifting.html
And again closer to an algo tham a data structure, but Sum over Subsets DP in 3^n also has a cool little bit of math in it: https://cp-algorithms.com/algebra/all-submasks.html