Google: Count the ways to spell a word using chemical element symbols
Problem. You get the periodic table, meaning the set of element symbols (one or two letters, such as H, C, Si, Cs), and a single word. Count how many different ways the word can be broken into a sequence of element symbols, so that joining the symbols gives back the word.
Example. The word "physics" can be covered in more than one way. One split is P, H, Y, Si, C, S. Another is P, H, Y, S, I, Cs. Each distinct split counts once toward the answer.
Notes from the candidate. This was the phone screen for an L4 role and the candidate cleared it. The post does not list input limits or any follow-up questions, so the interesting part is recognizing that at each position you can take either a one-letter or a two-letter symbol, and that many of these choices lead to the same remaining suffix. Later onsite rounds covered ranking chess players from game results and a piano hand-span problem.
Comments 0
No comments yet. Ask the author something, or add what happened in your own round.