😍💯2 Lines of Codeeeee with 1 ms✅,Beats 90.31% in Memory📝 The Easiest Approach Ever🚀
Appproach\nAaaaaaaaaaaaa.. I mean There\'s not much to explain. I\'m simply using contains() to check if any substring "()" is present in the main string. If I 
# Appproach\nAaaaaaaaaaaaa.. I mean There\'s not much to explain. I\'m simply using contains() to check if any substring "()" is present in the main string. If I find it, I remove it.\n\nFor example, let\'s say you have a string like "(((((())))))\')". In this case, everything is balanced except for the last \')\'.\n\nWith my approach, each time I find a valid pair "()", I remove it. In the end, I\'m left with just \')\'. To balance this, I need one more \'(\', which is exactly what the length of the remaining string represents.\n\n# Code\n```java []\nclass Solution {\n    public int minAddToMakeValid(String s) {\n        while(s.contains("()"))s=s.replace("()","");\n        return s.length();\n    }\n}\n```
['String', 'Stack', 'Greedy', 'Java']