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)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay