"hiho" is a weekly series of contest we developed to help programmers improve their skills following some architecture.
In the several following weeks we will learn some kinds of balanced search trees with Little Hi and Little Ho. Balanced search trees are very useful data structures to maintain data ordered. When we need to dynamically insert and delete elements from a ordered data set and at the same time know what is the Kth largest element, what is the index of a given element or what is the prefix and surfix of a given element, balanced search tree comes in handy.
This week learn Treap, a kind of balanced search tree whose expected depth is O(logn).