+ 10
My most involved SoloLearn code yet, the RegEx generator
I implemented a class, which represents a "system of RegEx equations" and has a method to solve that system. This code uses it to construct RegEx, which match base b string representations of numbers n, such that n%q=r for user defined b,q,r. With b=2, q=3, r=0, we get the RegEx (0*1(01*0)*1)*0* which will match all binary numbers divisible by 3, like 1001 (which is 9), but not 100 (which is 4). https://code.sololearn.com/c7LXmfGbu02U
3 Respuestas
+ 6
Wow you rock
+ 6
If you want to know how or why this works, but don't have a solid background in computer science (yet ;), take a look at this blog entry, it is almost beginner friendly, but you still need some knowledge in the field: https://michaellevet.wordpress.com/2015/04/22/automata-theory-brzozowski-algebraic-method/
If that does not help you all too much and/or you want to learn more, I will be very happy to explain a thing or two.
+ 2
So cool....... Bro