Algorithms from CLRS book. Implementation in python or scala