← All problemsSign in

Reduce the String

You are given two strings $a$ and $b$. An array of integers $[l1,l2,....,l(|a|)]$ is also given using which you have to reduce the string $a$. We denote the length of word $a$ as $|a|$. The integers in the array represent the position of letters in $a$. You have to find the maximum number of integers which can be removed starting from $l1$, such that it is possible to form $b$ with the remaining l

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