Recursion

Instructions for Using the Simulation:

  • Problem Selection: Four problems are available, listed in the left column:

    • Sum of Numbers
    • Power of a Number
    • Factorial of a Number
    • Fibonacci Series

    Select one problem from the four options. The problem objectives and detailed statements are provided in the center column.

  • Simulation Instructions: After selecting a problem, review the instructions for running the simulation, located in the top bar.

  • Language Selection: Choose one of the three programming languages (C, Python, or JavaScript) for the code block.

  • Code Display: Upon language selection, the corresponding code will be displayed in the "Code Block" section.

  • Code Completion: Complete the code by filling in the options provided in the dropdown menus within the code. Ensure your selections align with the logic of the chosen problem.

  • Navigation and Control: All control buttons are located in the bottom right corner of the page.

  • Code Execution and Analysis: Click "Run" to execute your code and check its correctness. The following information will be displayed:

    • Variable Values: Details of the program's variables.
    • Max-Size: The value of 'n' selected.
    • Stack: Visualization of stack usage for the provided values.
  • Step-Through Execution: Use the "<" and ">" buttons to navigate backward and forward through the program's execution.

  • Reset: Click "Reset" to reset the entire simulation.