A pair of English words (w1, w2) is called a rotodrome if one can be circularly shifted (rotated) to create the other word. For example, the words (windup upwind) are a rotodrome pair, because we can rotate “windup” two positions to the right to get “upwind.”
Give an efficient algorithm…
Top comments (0)