Can Construct String from Periodic Table of Elements Symbols
Anonymous User
764

Given a string of characters, check whether it's possible to construct it from the symbols of the periodic table of elements.
Constraints:

  • String can be empty but not null
  • Matching is case-insensitive
  • Symbols can be used more than once

Examples:
Nag can be constructed from N nitrogen and Ag silver
OH can be constructed from H hydrogen and O oxygen
HJ can not be constructed

Comments (2)