Exam-style question
Try this first
Which string is generated by the regular expression a(a|b)*?.
- A.ba
- B.ababa
- C.bbb
- D.bbab
Model answer
What a good answer should say
- ababa
Explanation
Why this works
The expression must begin with a. After that, it can contain zero or more occurrences of either a or b, so ababa is generated.
Common mistake
No common mistake is linked to this question yet.
