Given a file containing strings that contains random ASCII characters, find all strings that contain the same amount of ‘A’ and ‘B’ characters, called AB-Equal.
Some examples:
ABABABjhkdsgisfgjoBBAABBA
BBAAaslkjhdlkajlkasjdlkjhldfjosBaskdfsA
ababab
BBAAjdhBA
BBBBBBBBJKL
asdlkajsdlkjasBBAAA
ndls2384u09u09sdfnkBBB
AB
ab
The result contains the following strings marked as AB-equal:
false
true
true
true
false
false
false
true
true
true