Are you scared when you hear about all these pesky data structures like Fenwick Tree, RMQ, Segment Tree in competitive programming?
Are you afraid of writing code to solve problems like finding the minimum, maximum, or sum of some range query, especially when there are updates to the data?
Well, fear no more! In this tutorial I will introduce the Swiss knife of all sequence manipulation data structure, one code that can (theoretically) solve every problem of this kind, one tree to rule them all — the Splay Tree!
So this is a tutorial I wrote on the Splay Tree:
https://zhtluo.com/cp/splay-tree-one-tree-to-rule-them-all.html
Feedback and additional practice problems are welcomed. Enjoy :)