← Amazon questions

Count Atoms in a Chemical Compound

Filed under Amazon

Given a chemical formula (represented as a string), return the count of each atom. The format is a chemical formula returns the count of each atom as a string in alphabetical order (e.g., "H2O" ->…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.