← Questions

Count ways to spell a word with element symbols

0
GoogleCodingLast asked Apr 2026

Given the symbols of the chemical elements and a word, count the ways to write the word as a sequence of element symbols, ignoring case. For example, "Physics" splits as P-H-Y-Si-C-S, P-H-Y-Si-Cs, P-H-Y-S-I-C-S or P-H-Y-S-I-Cs.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding