← All problemsSign in

Ram and String

Problem description. Ram and Shyam were competing against each other and asked each other competitve problems . It is Shyam's turn and his problem is as follows : 1 . A string is given . Let " w " be the longest substring of length l of the given string such that it is also its prefix . 2. Now he was asked whether its possible to remove some prefix ( meaning some characters from the starting

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