Snakes and ladders: patterns in Heapsort

  • Authors:
  • Jeff Parker

  • Affiliations:
  • Merrimack College, North Andover, MA

  • Venue:
  • Journal of Computing Sciences in Colleges
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Looking at a scatter plot of a permutation of the numbers from 1 to N as they are sorted gives great insight into how a sorting algorithm works. We describe a vivid pattern that emerges when using Heapsort to sort a sorted array. This pattern provides an engaging way to discuss important attributes of Heapsort and other good sorts.