Question: Convertor ( 1 0 0 Marks ) You are given a string S containing two characters ' a ' and ' b ' . In

Convertor (100 Marks)
You are given a string S containing two characters 'a' and 'b'. In one operation, you can two non-equal indexes in the string and swap the characters. You have to tell the minimu operations needed to make the string non-decreasing.
We define a string as non-decreasing if S[i]S[i+1], holds for every based
 Convertor (100 Marks) You are given a string S containing two

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!