Amazon Interview Question

Modify a binary sequence with possible anomalies to lower the error cost of the binary string. Error cost for converting 01 and 10 given respectively.