← All problemsSign in

Shibu and String Game

Shibu is playing a game in which she will be given two strings $A$ and $B$. In order to win the game, she needs to count the number of substrings of $A$ which are also present in $B$. She manages to win the game for smaller strings but it becomes difficult for her as the string size increases. To help her, write a program for her where she can input two strings $A$ and $B$ and get the desired re

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