C - Equal Substrings (Easy Version)
CodeChefOpen on judge ↗
_Please note that the two versions of this problem differ only by constraints. The problem statement is exactly the same in both._ You are given two strings $A$ and $B$ of lengths $N$ and $M$ respectively. Find the maximum length of a substring of $A$ that is also present in $B$. Let this maximum length be $K$. Also, find all such substrings of length $K$ that is present in both $A$ and $B$ and
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