Yet Another Problem On Strings
CodeChefOpen on judge ↗
You are given a string X consisting of lowercase alphabets. You are required to generate the largest string Y from X by following the given instructions below: - frequency(Y[i]) in X >= frequency(Y[j]) in X, where 1 and frequency(c) in X denotes the the number of occurrences of the letter c in the string X. - ASCII(Y[i]) > ASCII(Y[j]), where 1. If there are multiple such strings Y, then you a
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