self implemented efficient cpp algorithms and data structures