DATA STRUCTURE - RECURSION BASICS Some computer programming languages allows a module or function to call itself This technique is known as recursion
We will take only a superficial look at recursion in this course since it provides a very neat way to represent certain useful numerical functions and data
A function is said to be recursive if it calls itself again and again within its body whereas iterative functions are loop based imperative functions 2
Ming Zhang“ Data Structures and Algorithms “ Commonly used to deal with data which has recursive Non recursive implementation of recursive algorithm
11 3 Example: recursive implementation of the sum between two integers the stack of ARs is used as a temporary “data structure” in which to store the
28 mar 2013 · 4 2 4 Implementing Recursion C++ is used here strictly as a tool to illustrate data structures concepts In particu-
Which data structure is used by the compiler to implement recursion? (a) hash table (b) priority queue (c) queue (d) search tree (e) stack
Recursion is another, typically more favored, solution, which is actually implemented by a stack Memory Management Any modern computer environment uses a