← All problemsSign in

Strong and Weak

Chef Polo has come up with a challenge for Chef Palin. He has created a 2-D grid of letters. Each cell in the grid contains an alphabet (from A to Z). Now he asks Palin to choose any random alphabet from A to Z. If that alphabet exists in the grid, Chef Palin has to find the length of the longest path of consecutive letters, starting at that alphabet. Paths can step from one letter in the grid to

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