Recursion vs. Iteration
Renée A. McCauley, Brian Hanks, Sue Fitzgerald et al. · ACM Technical Symposium on Computer Science Education (SIGCSE) · 2015
This study compares differences in students' ability to comprehend recursive and iterative programs by replicating a 1996 study. These studies are interesting for the following reasons: (1) there have been few studies on the comprehension of recursive programs, (2) there have been few studies of recursion that involve the use of data structures, (3) subjects were asked to read and comprehend code that manipulated linked lists recursively. In a 1996 study, subjects found a recursive version of a linked list search function easier to comprehend than an iterative version. The results of this study contradict these earlier findings; subjects in this study were equally likely to correctly describe the purpose of the search algorithm, regardless of iterative or recursive implementation. Consistent with the findings in the 1996 study, subjects in this study were more likely to correctly describe the copy task using the iterative version of this problem rather than the recursive version. Subjects who correctly described the purpose of the copy method wrote abstract summaries. Many of the subjects who did not recognize the purpose of the code, and who answered incorrectly, provided a line-by-line (partial) trace of the code. While revealing some understanding of the execution of the code, these subjects were generally not able to see the forest for the trees.
Cited by 60 works. doi:10.1145/2676723.2677227
Authors
References
- Evaluating the Quality of Learning: The Solo Taxonomy : Structure of the Observed Learning Outcome
- What (else) should CS educators know?
- Learning Flow of Control: Recursive and Iterative Procedures
- The mystery of "b := (b = false)"
- Viewpoint
- Recursion via Pascal
- Learning iteration and recursion from examples
- Learning recursion as a concept and as a programming technique
- The case of base cases
- A Survey on Teaching and Learning Recursive Programming