Kim Connection
CodeChefOpen on judge ↗
Kim jong un declares that two words A and Bare "connected" only if the following condition holds LCS(A , B) ≥ max(|A|,|B|) - 1. |A| refers to length of word A LCS refers to longest common suffix.He learnt a lot of new words and now wants to form a chain of words such that each word in the chain and the word after it are "connected"(except for last word) , which will form the lyrics for his new s
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