Chef and strings
CodeChefOpen on judge ↗
Chef loves strings very much. One day one of his friends gave him two strings A and B. He asked chef to calculate the number of substrings in A that are present in B and number of substrings in B that are present in A. Chef needs your help to complete this task. Input Two strings A and B of length lOutput Two numbers X and Y, X is the number of substrings in A that are present in B. Y is the nu
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