Company: Amazon_13sep
Difficulty: medium
Minimum Errors in Binary String Problem Description Amazon's database doesn't support very large numbers, and hence, numbers are stored as a string of binary characters, 'O' and 'I'. Accidentally, a 'T' was entered in some positions, and it is unknown whether they should be 'O' or 'I'. The string of incorrect data consists of the characters 'O', 'I', and 'T', where 'T' represents an unknown character. The 'T' can be replaced with either 'O' or 'I'. Due to some internal faults, errors are generated every time the characters 'O' and 'I' appear together as 'OI' or 'IO' in any subsequence of the string. It is observed that the number of errors a subsequence 'OI' generates is x, while a subsequence 'IO' generates y errors. Determine the minimum total errors generated. Since the answer can be very large, return it modulo 10 9 + 7. The minimum number of errors is minE, % MOD (10 9 + 7). Hint: It can be proved that (a + b) % c = ((a % c) + (b % c)) % c where a, b, and c are integers and % repr