re: How to lose a Job in 10 minutes VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Just my two cents, here, but I think the interviewers are looking to see if think about grouping the city by length first, and then check for rotat...
 

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.

code of conduct - report abuse