New York Times Interview Question

Rotation of strings by x amount