HackerTrans
トップ新着トレンドコメント過去質問紹介求人

EnderShadow8

no profile record

コメント

EnderShadow8
·4 年前·議論
Segment trees are objectively superior in all ways except implementation length
EnderShadow8
·4 年前·議論
I've been told to consider it constant for all practical purposes
EnderShadow8
·4 年前·議論
Treap: https://en.wikipedia.org/wiki/Treap

It's like a Red-Black tree in use case, but much faster to implement, which is good for competitive programming. The average case complexity is the same for all operations, but there's an unlikely degeneration to worst-case linked-list behaviour.

Lazy Propagation Segment Tree: https://cp-algorithms.com/data_structures/segment_tree.html

Like a segment tree in that it supports range queries in logarithmic time, but supports range updates in log time as well.

I know a few more fun ones that I occasionally use in contests, but I've never touched otherwise.