you give string s consist character byou delete number character s s balanced s balanced pair index ij j si b sj areturn minimum number deletion need s balanced Example 1input s aababbaboutput 2explanation you eitherdelete character 0indexe position 2 6 aababbab aaabbb ordelete character 0indexed position 3 6 aababbab aabbbbexample 2input s bbaaaaabboutput 2explanation the solution delete character Constraints1 slength 105si b