← All problemsSign in

Musician

DJ wants to become a professional singer.He considers every character as a tone of music and likes to play with it. DJ considers a string, s , to be valid if either of the following conditions are satisfied: 1.All characters in s have the same exact frequency (i.e., occur the same number of times). For example, s="aabbcc" is valid, but s="baacdd" is not valid. 2.Deleting exactly 1 character from

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