simple and easy C++ solution || O(n) || O(1)
\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n###### Let\'s Connect on LinkedIn: www.linkedin.com/in/shishirrsiam\n\n# Complexity\n- Time complexi
\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n###### Let\'s Connect on LinkedIn: www.linkedin.com/in/shishirrsiam\n\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int minAddToMakeValid(string s) \n    {\n        int count = 0, ans = 0;\n\n        for(auto ch : s)\n        {\n            if(ch == \'(\') count++;\n            else count ? count -- : ans++;\n        }\n\n        return ans + count;\n    }\n};\n```
['String', 'Stack', 'Greedy', 'C++']