← All problemsSign in

Flower Sequence

There is a square garden with red and white flowers planted. Unnati enters the garden from the top left corner and she travels in a spiral inwards manner and plucks all the flowers. We need to find the longest sequence of red and white flowers plucked by Unnati in this process. We can represent the garden in the for of a square matrix. Each element in the matrix is a flower. Red flowers are denot

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