Algorithms and data structures samples of code