Question

When debugging a recursive function that processes a `Tree` data structure, what is a common strategy to identify infinite recursion or incorrect base cases? 

A Increase the recursion depth limit.
B Use print statements to trace function calls and their parameters at each level.
C Convert the recursive function to an iterative one.
D Ignore the base case and focus only on the recursive step.
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)