Implementation of some data structures