C++ very beginer friendly easy solution just do what say
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    string countOfAtoms(string formula) {\n        map<string, int> atomCount;\n        string result;\n        int count = 0, multiplier = 1;\n        stack<int> multiplierStack;\n        \n        for (int i = size(formula) - 1; i >= 0; i--) {\n            if (isalpha(formula[i]) && islower(formula[i])) {\n                int len = 2;\n                i--;\n                \n                while (i >= 0 && islower(formula[i])) {\n                    i--;\n                    len++;\n                }\n                \n                string atom = formula.substr(i, len);\n                atomCount[atom] += max(count, 1) * multiplier;\n                count = 0;\n            } else if (isalpha(formula[i]) && isupper(formula[i])) {\n                string atom(1, formula[i]);\n                atomCount[atom] += max(count, 1) * multiplier;\n                count = 0;\n            } else if (isdigit(formula[i])) {\n                count = formula[i] - \'0\';\n                int power = 10;\n                \n                while (i - 1 >= 0 && isdigit(formula[i - 1])) {\n                    count += power * (formula[--i] - \'0\');\n                    power *= 10;\n                }\n            } else if (formula[i] == \')\') {\n                multiplierStack.push(multiplier);\n                multiplier *= max(count, 1);\n                count = 0;\n            } else {\n                multiplier = multiplierStack.top();\n                multiplierStack.pop();\n            }\n        }\n        \n        for (auto [atom, cnt]: atomCount) {\n            result += atom;\n            \n            if (cnt > 1) {\n                result += to_string(cnt);\n            }\n        }\n        \n        return result;\n    }\n};\n\n```
['Hash Table', 'Stack', 'Sorting', 'C++']