how to solve left rotation