hackerrank left rotation problem solution