Visual representations for recursive algorithms

  • Authors:
  • Linda Stern;Lee Naish

  • Affiliations:
  • The University of Melbourne, Melbourne, Victoria, Australia;The University of Melbourne, Melbourne, Victoria, Australia

  • Venue:
  • SIGCSE '02 Proceedings of the 33rd SIGCSE technical symposium on Computer science education
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

We have developed a framework for pedagogically-oriented animations, designed to help students learn new algorithms. Recursive sorting and searching algorithms pose a particular challenge, as it can be difficult to find visual representations that help students develop a mental model of how the recursion proceeds. Relatively complex representations, such as thumbnail sketches or explicitly showing the function stack along with the data structure are appropriate for some algorithms, while simpler representations suffice for others. We have found it useful to classify recursive algorithms according to the way they navigate through a data structure and manipulate data items within it, sometimes with further subdivision according to the kind of recursion. Within each category there are common strategies for visual representation. While there may be no single, general way to represent recursive algorithms, classification is a useful guide to picking an appropriate strategy when animating recursive algorithms.