A reversible sequence of steps from the specification of the algorithm and the mathematical definition of the recurrent solution through the recursive procedure, the tail recursive procedure and finally to the iteration procedure, is shown. The notation for analysing recursive function execution as well as modified flow charts of an algorithm to identify the differences between the iteration and the tail recursion are proposed. All the procedures are written in Logo, so the lists are used as the data structure. Transformation from the recursive procedure to the iterative procedure and vice versa can be shown in such a way in every language in which the recursion is allowed. All examples are one-recursion-call examples and all except one are the functions of discrete mathematics. © 2007 Institute of Mathematics and Informatics, Vilnius.
CITATION STYLE
Foltynowicz, I. (2007). Recursion versus iteration with the list as a data structure. Informatics in Education, 6(2), 283–306. https://doi.org/10.15388/infedu.2007.19
Mendeley helps you to discover research relevant for your work.