I not good with regex so I brute force part 2. For a given product Id, I find the factors of its length, then group the id into those factors (except for the last factor), then check if each group is the same.
Bit slow, but got the right answer on my first run thru. Happy with that.
View all comments
Show parent comment
2
u/Rincey_nz Dec 04 '25
I not good with regex so I brute force part 2. For a given product Id, I find the factors of its length, then group the id into those factors (except for the last factor), then check if each group is the same.
Bit slow, but got the right answer on my first run thru. Happy with that.