← All problemsSign in

Equal Strings

CodeChefRating 1092Open on judge ↗

Given a string $A$ of length $N$ consisting of lowercase English alphabet letters. You are allowed to perform the following operation on the string $A$ any number of times: - Select a **non-empty** [subsequence](https://en.wikipedia.org/wiki/Subsequence) $S$ of the array $[1,2,3,\ldots,N]$ and any lowercase English alphabet $\alpha$; - Change $A_i$ to $\alpha$ for all $i \in S$. Find the mini

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