simendsjo:
> I agree that's much simpler, but s1 ~ s1 doesn't perform too well I 
> think. Always creates a new heap allocation and copies the array..

The version written by Pelle is better. On the other hand performance is not an 
absolute thing, it's "good enough" or "not good enough", and in many situations 
you don't need a high-performance rotate test function.

Bye,
bearophile

Reply via email to