Question: Write a method bool inLanguage(char* theString) that uses one stack and no counters to determine whether theString has the same number of A's as B's.
Write a method bool inLanguage(char* theString) that uses one stack and no counters to determine whether theString has the same number of A's as B's. If the string contains anything other than A or B (capital A or capital B), return false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
