← Morgan Stanley questions
CodingMedium-Hard

Format unsorted chemical elements array into sorted scientific formula

Filed under Morgan Stanley

Given an array of chemical element names or symbols in an unsorted order, aggregate them and return a properly formatted and sorted chemical formula string (e.g., aggregating counts as subscripts like…

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 Morgan Stanley questions

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