Question: Amazons database doesn't support very large numbers, so numbers are stored as a string of binary characters, ' 0 ' and ' 1 ' .

Amazons database doesn't support very large numbers, so numbers are stored as a string of binary characters, '0' and '1'. Accidentally, a '!' was entered at some positions and it is unknown whether they should be '0' or '1'.
The string of incorrect data is made up of the characters '0','1' and '?' where '!' is the character that got entered incorrectly. '?' can be replaced with either '0' or '1'. Due to some internal faults, some errors are generated every timn '0' and '1' occur together as '01' or '10'in any subsequence of the string. It is observed that the number of errors a subsequence '01' generates is x, while a subsequence '10' generates y errors.
Determine the minimum total errors generated. Since the answer can be very large, return it modulo 109+7.
 Amazons database doesn't support very large numbers, so numbers are stored

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!