Recursion or Iteration
Ramy Esteero, Mohammed Rabbul Hossain Khan, Mohamed Mohamed, Larry Yueli Zhang, Daniel Zingaro · 2018
Recursion and iteration are two key topics taught in introductory Computer Science. This is especially so for CS2 students, as CS2 is the course where recursion is typically taught and where control-flow concepts are solidified. When asked to solve a problem that could feasibly be solved with recursion or iteration, what do CS2 students choose to do? And how does this choice relate to the correctness of their code? This paper provides one answer to these questions through an analysis of student exam responses to a problem on finding deepest common ancestors in trees.