LeetCode 726: Number of Atoms
Problem Restatement We are given a valid chemical formula string. The formula contains atom names, numbers, and parentheses. We need to count how many times each atom appears, then return the result as a string sorted by atom name. An atom name starts with one uppercase letter. It may be followed by lowercase letters. Examples: "H" "Mg" "Ca" A number after an atom means the atom appears that many times....