Solve problems of computing W*X for every rotation of X and W = [1..n]