Smallest String and Regex
-
-
abhiranjan 10 years ago Yes.
-
madan_ram 10 years ago I don't think the above regex is not valid, I have tested in regpal.
-
AhmedAKZM 10 years ago It is not a valid regex - it has multiple repeats.
-
abhiranjan 10 years ago Please refer to the definition of kleene star given in the problem statement.
-
AhmedAKZM 10 years ago How should we interpret a*b** then? Is a*b** not equivalent to a*b*? I don't mean to sound inpertinent, but allowing multiple repeats makes no sense (to me anyways)...
Edit: if it makes sense to you, then please explain how.
-
abhiranjan 10 years ago You already answered yourself.
-
-
-
-
-
((c|d*)*ab)**
is a valid regex, isn't it?Add Reply Preview cancel