Recursive Backtracking · Wiki · CS198 / Documentation / Courses · GitLab
This assignment has 4 parts: Debugging/Warmup, Predictive Text, Banzhaf Power Index, and Redistricting. The first part of the debugging exercise has students practice with using the five debugger control buttons (continue, stop, step in, step out, step over) to walk through a solver for the Towers of Hanoi puzzle. There shouldn't be any special insight here, if you're helping students with this, just make sure that they're actually pressing the correct buttons as instructed by the writeup. In the second part of the debugging exercise, students construct test cases to unearth a very subtle bug in code to solve the subset sum problem. The bug in the recursive call is update of sumSoFar variable is written as sumSoFar += v[index] rather than sumSoFar + v[index], which causes the sumSoFar variable to be incorrectly modified from iteration to iteration of the for loop. This bug should surface whenever there are two or more choices to make inside the for loop, which means that the for loop r
This assignment has 4 parts: Debugging/Warmup, Predictive Text, Banzhaf Power Index, and Redistricting. The first part of the debugging exercise has students practice with using the five debugger control buttons (continue, stop, step in, step out, step over) to walk through a solver for the Towers of Hanoi puzzle. There shouldn't be any special insight here, if you're helping students with this, just make sure that they're actually pressing the correct buttons as instructed by the writeup. In the second part of the debugging exercise, students construct test cases to unearth a very subtle bug
related reading
- CS106B Backtracking Warmupweb.stanford.edu
- CS106B Recursive Backtracking and Enumerationweb.stanford.edu
- Debugging Reinforcement Learning Systemsandyljones.com
- Reading 14: Recursionweb.mit.edu
- How Not to Teach Recursionparentheticallyspeaking.org
- Complete Search with Recursion · USACO Guideusaco.guide
- CSC 151 - Recursion Over Listseikmeier.sites.grinnell.edu
- CSC 151 - Coding Challenge 6eikmeier.sites.grinnell.edu
- CSC 151 - Coding Challenge 7eikmeier.sites.grinnell.edu
- The Recurse Center User’s Manual - Recurse Centerrecurse.com
- Backtracking - Wikipediaen.wikipedia.org
- CSC 151 - Recursion over Numberseikmeier.sites.grinnell.edu