Sections

Each week, you will complete problem(s) to submit at the start of section. Most weeks there will be problems posted for both Tuesday's and Thursday's section. You must complete at least one problem set per week to earn +3 points for that week. You must earn a total of 20 points for the quarter to receive full credit. Additional points beyond these 20 do not affect your grade, but you are welcome to complete every set of problems if you like. (These points become part of your homework grade; each weekly homework assignment is worth 40 points, so all of the section points for the quarter combine to equal roughly half the weight of one homework assignment.) You may only receive credit for your section homework if you attend section.

You will not be graded on whether you have a perfect solution, but on whether you have demonstrated effort. Therefore please show some work that demonstrates how you got the answer rather than just writing the answer by itself. We will be somewhat lenient about exactly how the work is shown. If you find that you have been working on these problems for more than 30 minutes, please stop and indicate this on your paper. Incomplete solutions can still receive credit.

Section homework will be made available the day before it is due. Since it is meant as a warm-up for section, we encourage you to do it not too long before section.

Section 13: Recursive backtracking (Tue May 13)

Problems: Solve the following two (2) problems on paper (hand-written or printed) and bring your sheet of paper to your section:

  1. In last Wednesday's lecture examples (see Dice.java), why did we need to use a private helper method? Explain in a sentence or two.
  2. What is pruning in the context of recursive backtracking? Why is it worth doing?

Section 11: 2D Arrays and TA's choice (section problems on searching/sorting) (Tue May 6)

Problems: Solve the following three (3) problems on paper (hand-written or printed) and bring your sheet of paper to your section:

  1. Self-Check 13.20 (p863): What indexes will be examined as the middle element...
  2. Self-Check 13.26 (p864): How many calls on the mergeSort...
  3. Self-Check 13.27 (p864): Show the state of the elements ... / Show a trace ... (solve both (a) and (b).)

Section 9: Sets and Maps (Tue Apr 29)

Problems: Solve the following two (2) problems on paper (hand-written or printed) and bring your sheet of paper to your section:

  1. Self-Check 11.10 (p733): A List has every ... (A few sentences will suffice.)
  2. Self-Check 11.20 (p735): What keys and values are contained ... (write the final contents of the map in the following format; the relative order of the keys doesn't matter. {key1=value1, key2=value2, ...}

Section 7: Recursion (Tue Apr 22)

Problems: Solve the following two (2) problem on paper (hand-written or printed) and bring your sheet of paper to your section:

  1. Self-Check 12.4 (p803): mystery1 method. For each of the following calls, indicate the output that is produced by the method: (Solve only parts (a), (b), and (e). Show your work by writing out the series of calls that are made before writing the final output. For example, if mystery1(5) calls mystery1(4), write the sequence of such calls before your answer.)
  2. Self-Check 12.11 (p805): The following method is an attempt...

Section 2: implementing ArrayIntList (Thurs Apr 3)

Problems: Solve the following two (2) Self-Check problems on paper (hand-written or printed) and bring your sheet of paper to your section:

  1. Self-Check 15.7 (p946): An element can be inserted at ...
  2. Self-Check 15.8 (p946): Write methods called min and max that ... (Write just one of the two methods. Either one is fine. You don't need to write both.)

You don't need to write a complete program; just the relevant lines of code to answer the question.