← All problemsSign in

Fibonacci Series using Stacks

Your task is to implement a Fibonacci number generator using a stack. It is assumed that the first Fibonacci number is $0$ and the series starts from there. ###Input: - First line will contain $T$, number of testcases. - Second line will contain the size of the stack - Third line would contain the number of operations - Then, for operation: A number $n$ will be given as input. ###Output: - For

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