Given a number of strings that contains random ASCII characters, find all strings, that contain the same amount of ‘A’ and ‘B’ characters.
We call strings that fulfill this criterium AB-equal.
Some examples:
ABABABjhkdsgisfgjoBBAABBA
BBAAaslkjhdlkajlkasjdlkjhldfjosBaskdfsA
ababab
BBAAjdhBA
BBBBBBBBJKL
asdlkajsdlkjasBBAAA
ndls2384u09u09sdfnkBBB
AB
ab
This should result in the following strings being identified as AB-equal:
false
true
true
true
false
false
false
true
true
true