c++ - Using stack, make a program that determines if a pattern of characters is valid using the following rule: A^N B^N -


in c++, program must read patterns evaluate file called asig5.ent. must create file called asig5.sal put results.

i know how work stacks, don't understand instructions @ all.

i'm not asking give me code.

i need explain me instructions it.

a^nb^n intended regular-expression-looking thing. basically, it's string starts number of as, followed many bs.

for instance, following strings match pattern:

"" "ab" "aabb" "aaabbb" 

and following not:

"a" "b" "aab" "cat" "aabbc" 

exponentiation notation on strings means repeated concatenation, a^2 aa, a^3 aaa, etc. set of strings match pattern {a^nb^n | n >= 0}.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -