← All problemsSign in

CROP SPRINKLER (Easy)

There is a 2D array / matrix of a crop field given to you. Each crop needs a water source. Each water source hydrates the 8 tiles around it. With $w$ representing a water source, and $c$ representing a crop, find that if every crop is hydrated or not. Example: [[ "$w$", "$c$" ], [ "$w$", "$c$" ], [ "$c$", "$c$" ]] -> Every crop is hydrated ###Category: - Easy (10 Marks)

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