The Final One
CodeChefOpen on judge ↗
Alex has some pending assignments to do. His teacher is very strict regarding summer assignments. Here goes the task : You are given two strings $S$ and $T$ of length $N$ and $M$ respectively. You need to find a string $X$ which is a prefix of $S$ as well as a suffix of $T$. You may perform none or atmost one of the following operations on the given strings - - Reverse the string $S$ before calcul
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