DEV Community

Discussion on: How to lose a Job in 10 minutes

Collapse
 
mrtoph profile image
Christoph Michel

That's a nice idea. I also just thought of a useful way to check if two strings x,y are rotations of each other.

x is a rotation of y iff x occurs in yy and size(y) = 2*size(x)

Actually, it's quite similar to what you're suggesting.