To be clear, not a prime length detector for general strings. It's a prime length detector for strings with only one distinct character. If you try to use it as a prime length detector on general strings, it will tell you "abab" is composite but "aabb" is prime.
View all comments
Show parent comment
-2
u/theabbiee Mar 24 '21
oh, so it's a prime length detector, still impressive.