elementary algorithms and data structures