Equate S and T
You are given $2$ strings $S$ and $T$ of length $N$ and $M$, respectively. Both of the strings only contain characters $a$ and $b$. You can do the following operation on **either** $S$ or $T$ as many times as you want : - Find an occurrence of character $\text{a}$ in the chosen string, and then replace it with $\text{ab}$. Check if $S$ and $T$ can be made equal. Output $\text{Yes}$ if it is po
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