DEV Community

prakashsellathurai
prakashsellathurai

Posted on

rotodrome pairs among n words of length k

rotodrome pairs among n words of length k

-1

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)