← All problemsSign in

Puzzle of Liam

## Statement Liam was bored and wanted to create a puzzle for his friends to solve. He was good with observing patterns. He quickly came up with the following puzzle. Given 3 strings, `s1`, `s2` and `s3`, find whether the triplet of the strings is good or bad. A triplet of strings is said to be good if and only if number of occurrences of `s3` in `s2` is same as number of occurrences `s2` in `s1`

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start