Chain of Words
CodeChefOpen on judge ↗
Chef has invented a brand new dish in his restaurant. He decided to name it in an interesting way. Chef is a big fan of “Chain of Words”. Chain of words is a chain which is made up of words arranged in such a way that the last letter of each word is equal to first letter of the word connected to it. For example, abc->cbd->def is a valid word chain of length 3. Now chef wants to use this method to
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start