Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

Use a visual proof to demonstrate that the better strategy for resizing arrays is doubling the size to make it easier for students to understand.

Share Use a visual proof to demonstrate that the better strategy for resizing arrays is doubling the size to make it easier for students to understand. with FacebookShare Use a visual proof to demonstrate that the better strategy for resizing arrays is doubling the size to make it easier for students to understand. with Twitter
  • This proof uses amortised analysis to show that doubling the size of the array is more efficient than increasing the size of the array by a constant amount.
    • To see the visual proof, check out Don Blaheta's paper, "A Visual Proof of Amortised-linear Resizable Arrays".
  • Note from the CS Teaching Tips Team: for more information about amortised analysis, visit the Amortised Analysis Wikipedia page.

More about this tip

Tags

  • CS 2
  • Data Structures
External Source
“A Visual Proof of Amortised-linear Resizable Arrays” by Don Blaheta
Other Tips By
Other Tips By Don Blaheta

Similar tips

Use 7-day 4-doses-a-day pill-organizers to introduce students to 2D arrays because these create an interactive, 7-by-4 two-dimensional array that helps students visualize this abstract concept.
Use Problets.org to help students practice programming basics in C++, Java, C#, or Visual Basic
Misconception: Students incorrectly assume that Java’s substring method is destructive and wrongly anticipate the original string will change.

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Powered by Drupal.

Privacy Policy