← All problemsSign in

Zones

Due to corona virus outbreak, government has divided cities in three categories :- red zone(the zone having highest possibilities of covid-19 spread), green zone (the zone having least possibilities of covid-19 spread) and orange zone (the zone having intermediate possibilities of covid-19 spread). Given a string $S$ of length $N$, consisting of characters $R, G$ and $O$ representing red, green

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