Algorithms and data structures implemented in Scala