completed Rotate List using quadratic time