Don Blaheta https://www.csteachingtips.org/ en 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. https://www.csteachingtips.org/tip/use-visual-proof-demonstrate-better-strategy-resizing-arrays-doubling-size-make-it-easier <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">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.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-07-14T09:23:11-07:00" title="Tuesday, July 14, 2015 - 09:23" class="datetime">Tue, 07/14/2015 - 09:23</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/use-visual-proof-demonstrate-better-strategy-resizing-arrays-doubling-size-make-it-easier" data-a2a-title="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."><a class="a2a_button_facebook"><span class="a2a_label">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 Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">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 Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>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.</li> <ul><li>To see the visual proof, check out Don Blaheta's paper, <a href="http://cs.longwood.edu/~dblaheta/research/dpb-iticse09-amort.pdf">"A Visual Proof of Amortised-linear Resizable Arrays"</a>.</li> </ul><li>Note from the CS Teaching Tips Team: for more information about amortised analysis, visit the <a href="http://en.wikipedia.org/wiki/Amortized_analysis">Amortised Analysis Wikipedia page</a>.</li> </ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Tue, 14 Jul 2015 16:23:11 +0000 cstt 1081 at https://www.csteachingtips.org Have students implement an algorithm in Java to solve mazes so they can practice manipulating 2D arrays, stacks, and queues. https://www.csteachingtips.org/tip/have-students-implement-algorithm-java-solve-mazes-so-they-can-practice-manipulating-2d-arrays <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--title--tip.html.twig x field--node--title.html.twig * field--node--tip.html.twig * field--title.html.twig * field--string.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <span class="field field--name-title field--type-string field--label-hidden">Have students implement an algorithm in Java to solve mazes so they can practice manipulating 2D arrays, stacks, and queues.</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--title.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--uid--tip.html.twig x field--node--uid.html.twig * field--node--tip.html.twig * field--uid.html.twig * field--entity-reference.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <span class="field field--name-uid field--type-entity-reference field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'username' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> <span>cstt</span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/user/username.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--uid.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--created--tip.html.twig x field--node--created.html.twig * field--node--tip.html.twig * field--created.html.twig * field--created.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <span class="field field--name-created field--type-created field--label-hidden"> <!-- THEME DEBUG --> <!-- THEME HOOK: 'time' --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> <time datetime="2015-07-01T16:09:47-07:00" title="Wednesday, July 1, 2015 - 16:09" class="datetime">Wed, 07/01/2015 - 16:09</time> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/time.html.twig' --> </span> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--node--created.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'links__node' --> <!-- FILE NAME SUGGESTIONS: * links--node.html.twig x links--inline.html.twig * links--node.html.twig * links.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/navigation/links--inline.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'addtoany_standard' --> <!-- FILE NAME SUGGESTIONS: * addtoany-standard--node--tip.html.twig * addtoany-standard--node.html.twig x addtoany-standard.html.twig --> <!-- BEGIN OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <span class="a2a_kit a2a_kit_size_32 addtoany_list" data-a2a-url="https://www.csteachingtips.org/tip/have-students-implement-algorithm-java-solve-mazes-so-they-can-practice-manipulating-2d-arrays" data-a2a-title="Have students implement an algorithm in Java to solve mazes so they can practice manipulating 2D arrays, stacks, and queues."><a class="a2a_button_facebook"><span class="a2a_label">Share Have students implement an algorithm in Java to solve mazes so they can practice manipulating 2D arrays, stacks, and queues. with Facebook</span></a><a class="a2a_button_twitter"><span class="a2a_label">Share Have students implement an algorithm in Java to solve mazes so they can practice manipulating 2D arrays, stacks, and queues. with Twitter</span></a></span> <!-- END OUTPUT from 'modules/contrib/addtoany/templates/addtoany-standard.html.twig' --> <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--body--tip.html.twig * field--node--body.html.twig * field--node--tip.html.twig * field--body.html.twig x field--text-with-summary.html.twig * field.html.twig --> <!-- BEGIN OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><ul><li>When working with algorithms to solve a maze (represented as a 2D array), students use stacks and queues to keep track of where they’ve been and where they have yet to explore.</li> <ul><li>This provides a good opportunity to introduce depth-first and breadth-first search.</li> </ul><li>Students also learn how to manage and maintain several interacting objects and classes.</li> <li>For the full assignment, visit <a href="http://nifty.stanford.edu/2008/blaheta-maze/">Stanford’s nifty assignment page</a>.</li> </ul></div> <!-- END OUTPUT from 'themes/contrib/bootstrap_barrio/templates/field/field--text-with-summary.html.twig' --> Wed, 01 Jul 2015 23:09:47 +0000 cstt 937 at https://www.csteachingtips.org