Contents [0/1] |
Homework (MyRecursion, Union Find Problems) [1/1] |
(Click here for one slide per page)
Homework (MyRecursion, Union Find Problems) [1/1] |
Read Recursion Call Stacks. This will give you an iea of how recursion is implemented in Java - using our friend the Stack data structure!
The discussion in this document refers to a Java file: MyRecursionTrace.java. You can download this file and save it in a new package called ds1.student.recursion
in your IntelliJ IDEA project.
Optional: Do the exercises in this document. (You don't need to hand them in.)
Read Algorithms Section 1.5 - Case Study: Union-Find
Do Quiz 9 on Recursion and Union Find.
For some of the questions on Union Find, you may want to refer to some classes provided here.
Create a new package in IntelliJ IDEA, called ds1.student.recursion
. Download the following files and save them to this new package.
Do the homework assigned on D2L (see Submissions).
Make sure to submit each file to the correct folder. I will not move your homework to the correct folder (mostly because I won't look closely) - downloading your submissions and autograding them is automated!
hw9a: MyRecursion.java
Use the new package you created as instructed for Quiz 9, above: ds1.student.recursion
. Download the following file and save it to this package.
Look for all the TODO comments and implement the functions and provide any short answers (in comments) as requested.
hw9b: Union Find Problems
Do the following problems from the textbook on paper. Submit a Word doc, PDF, or text document with your answers.