Basic algorithms and data structures implemented in C#