Algorithms implemented i python