Two units are inverses if they differ only in case (input is restricted to ASCII)
O(n*m)
Reduce the given polymer to its smallest canceling inverse units
O(n*m)
Find the “problem” unit, i.e. the unit which when removed from the input gives the smallest reduction