A note on Cheney's nonrecursive list-compacting algorithm

  • Authors:
  • David C. Walden

  • Affiliations:
  • Bolt Beranek and Newman Inc., Cambridge, MA

  • Venue:
  • Communications of the ACM
  • Year:
  • 1972

Quantified Score

Hi-index 48.22

Visualization

Abstract

Cheney's list-compacting algorithm [1] goes into an infinite loop when it traces a circular list consisting exclusively of non-items. While it may be reasonable to say that such lists should not exist, it would be very difficult to legislate out of existence programs which illegally create such lists because of bugs, and it would not do for the garbage collector to break down in this instance.