Category Archives: Advanced Data Structure

Cartesian Tree

A Cartesian tree is a tree data structure created from a set of data that obeys the  following structural invariants:

Sparse Set

How to do the following operations efficiently if there are large number of queries for them. Insertion Deletion Searching Clearing/Removing all the elements. One solution… Read More »