JARVIS and LCP
CodeChefOpen on judge ↗
JARVIS(Just A Rather Very Intelligent System) has still many things to learn to become more intelligent. Tony Stark wants to teach Competitive Programming to it. So he starts directly with Strings and tells JARVIS about Longest Common Prefix(LCP) of two strings. Also Tony gives JARVIS a set of strings S1, S2, ..., Sn. JARVIS starts playing with those strings and comes up with a problem. The proble
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