If you convert a chemical formula to lower case, it may become ambiguous:
co can be both
Given an input consisting of
0 can only stand behind
0-9. Check whether it's ambiguous, unambiguous, or impossible. Return 3 different values for them. Shortest code wins.
co - ambiguous 2h83o6 - unambiguous li - unambiguous l - impossible cli - ambiguous c10h7o - unambiguous
One-sentence meaning: Is there zero, one or multiple ways to split input into concatenation of the following strings, case insensitive:
- You need to code the table into your program, since as I searched there was no question requiring an unordered chemical element table.