← All problemsSign in

MARIO AND ISLAND

Mario is now in the final stage of his success . To gain the super-Mario tag he needs to finish this last task. Mario is in an island , some part of island consist of land and other part is all water . Island is represented by N X M matrix A ; Aij denotes land if Aij = ‘L’ , water if Aij = ‘W’ . Lands are said to be connected from 4 directions vertically and horizontally if there is no water p

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