Click here to get the assignment

Assignment

Complete the following problems from the text. Pay attention to specific directions below as some differ slightly from what’s in the book. *Answers to non-coding problems should be placed inside the triple-quote blocks in ch6.py. Code will also go in that file. Where to put which answers should be clear labels in the python file.

Problems

  1. R-6.1 No Coding
  2. R-6.2 No Coding
  3. R-6.3 A stub has been provided. You must also write some testing code
  4. R-6.4 A stub has been provided. You must also write some testing code. Be certain that you implementation is recursive! No loops. None.
  5. R-6.7 No Coding
  6. R-6.8 No Coding
  7. R-6-12 No Coding
  8. C-6.18 Actually implement the function. A stub has been provided. You must also write some testing code.
  9. C-6.27 *Actually implement the function. A stub has been provided. You must also write some testing code.
  10. C-6.21 Actually implement the function. A stub has been provided. The function is given a list and should return a list of all the subsets (i.e. a list of lists!).

A Note on Testing

When testing these function, you are allowed to access and inspect the internal array. You should not, however, utilize the internal array, or any internal variables, when solving the problems. Use only the Stack/Queue interface methods.