Duplicate Words
CodeChefOpen on judge ↗
The chef is getting bored at home. So, he asked one of his friends to give him some task to keep him busy. His friend gave him an N number of sentences. The chef has to rewrite each sentence by removing instances of words that are repeated more than once continuously, but retain the first occurrence of any case-insensitive repeated word. The chef is finding it little difficult to complete the
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