Couple elimination problem
Given a string of some symbols, write a program to transform a string by repeatedly eliminating two same symbols occurring together.For example if the input string is ‘RGGB’ it will be reduced to ‘RB’ because ‘GG’ can be eliminated. Here are some more examples of input – outputInput | Output——————-GBRRBR | GRBGRGRR | BGRGGGBB |…