This algorithm is a slower alternative to the cyclic reduction algorithm (useful for testing purpose).