← All problemsSign in

Predict the next

Ravi went buying clothes at the mall and he saw a bunch of shirts with the $N$ flower petals printed on them , all of the shirts were arranged in a row with the first shirt starting with $0$ petals printed and the second with only $1$ petal from there on the next shirt had the $N$ of petals where $N$ is equal to the sum of $N$ for the previous two shirts i.e for the third shirt $N_2$ = $N_0$ + $N_

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