minimum deletions to make string balanced | leetcode 1653 | string

preview_player
Показать описание
Problem Link -




#String #Balanced #MinimumDeletion #LeetCode #Problem5 #Medium #Coding #Programming #Interview #Practice #DataStructure #Algorithm #Java #Preparation #NG #nickode #cct #cook_code_travel
Рекомендации по теме
Комментарии
Автор

The solution is not explained in a good way. The solution code provided is understandable and self-explanatory. Thank You for the code!

democrats
Автор

We can also optimize space used for counting 'a' - just count total 'a' in some variable and keep subtracting when not 'b' in for loop where we are updating result.
Both code added in repository.

NareshGupta