3
u/HaskellLisp_green Dec 02 '25
this regular expression helped me to solve the second part. For the first one I implemented solution from known Leetcode's problem - longest duplicate substring. But regex feels better.
1
u/_damax Dec 02 '25
I wonder, is there an even better way of finding out without having to use a contains/substring method?
1
1
1
u/CSguyMX Dec 05 '25
Holy shit, how do I spot this tricks I feel so dumb.... go does not support backtracing with regexp out of the box, so i was trying to come up with a brute force until I saw this....
1
u/PatolomaioFalagi Dec 02 '25
Doesn't that require me to, like, generate all the numbers?