← All problemsSign in

Chef And New Year

Chef is a competitive programming enthusiast. He started his NEW Year with solving interesting problems. So, if someone wishes Chef on New Year, he asks him a problem to solve. Chef gave you two string S1 and S2 each of length $N$. He asks to permute any substring of string S2 any number of times ( including 0 ). If it is possible, that string S1 can be get from S2 then Chef will say "Happ

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