Saturday, 31 January 2015
Recursion
During this week, I got some fresh ideas about recursion, which is an essential tool used in computer science basically when a function calls itself. At first, I didn’t figure it out completely because the technique used in the function seemed that there was no big difference between the functions we learned previously and this new recursion function. However, when I ran and called functions in shell I became confused about the result came out. Tracing functions helps me understand how the recursive functions behave. Since we are calling the same function again and again, it is easy to make mistakes, therefore, it is important to trace it step by step logically. When we are tracing the recursive functions, we will eventually get to the base case when problems are progressively getting smaller and smaller. All the problems will become easier when you can fully understand the process of tracing recursive functions.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment