All the released exercises will be placed here. Please refer to the calendar for
anticipated due dates in the future. Future due dates are tentative.
- All exercises will be submitted and graded on Gradescope.
- Some exercises may require submitting to multiple Gradescope assignments (e.g. if there is a programming
component as well as a written component). The assignment instructions will make it clear when this is the case.
- You may find these Math Identities useful for some
exercises.
Exercise |
Due |
EX0
|
Mon Jun 30, 2025 at 11:59pm |
EX1
|
Mon July 7, 2025 at 11:59pm |
EX2
|
Fri Jul 11, 2025 at 11:59pm |
EX3
|
Mon July 14, 2025 at 11:59pm |
EX4
|
Mon Jul 21, 2025 at 11:59pm |
Exercise Descriptions
Exercise 0
The objectives of this exercise are to:
- Set up your Java environment
- Refresh our Java programming skills
- Gain experience implementing data structures from an ADT
- Use Java generics
- Use benchmarking to study the running time of algorithms
This assignment has two main parts. The first involves implementing some data structures. The second involves
analyzing the running times of your implementations using benchmarking. Each part will have a separate Gradescope
submission, which will combine together to count as your exercise 0 grade.
For this exercise, you will need:
- Starter Code - which contains
various classes that will be needed for this assignment.
- Specification - which contains all
instructions for what to do for this assignment.
- Benchmarking
Worksheet - which you
will copy and complete for the benchmarking portion of the assignment.
Exercise 1
The objectives of this exercise are to:
- Gain experience identifying running times of given code
- Use the formal definitions of big-Oh, big-Omega, and big-Theta
- See examples of what changes to functions do/don’t change their asymptotic behavior
Instructions for this exercise appear in Gradescope. To submit you will provide your answers there (either as a
fill-in-the-blank or by uploading your work as an image or pdf).
Exercise 2
The objectives of this exercise are to:
- Understand the binary heap data structure by implementing it
- See how to modify the binary heap data structure to add new operations efficiently
- Apply the binary heap data structure to create a new data structure
This is a programming exercise which you will submit to gradescope. There is no written component to this
exercise, your code is your only submission.
For this exercise, you will need:
- Starter Code - which contains various classes that will be needed for this
assignment.
- Specification - which contains all instructions for what to do for
this assignment.
Update (7/2/2025): We just changed a little on the starter code. Please see the Ed post for more details.
Exercise 3
The objectives of this exercise are to:
- Gain experience with solving recurrence relations using the tree method
- See examples of how different changes to recurrence relations do/don’t change their asymptotic behavior
Instructions for this exercise appear in Gradescope. To submit you will provide your answers there (either as a
fill-in-the-blank or by uploading your work as an image or pdf).
Exercise 4
The objectives of this exercise are to:
- Identify the relationships between binary search trees and AVL trees by implementing AVL trees as a subclass
of binary search trees (and thereby inheriting methods whenever possible).
- Develop familiarity with the AVLTree data structure by implementing it. In particular: understanding what
information needs to be maintained in order to preserve the structure property (height of subtrees differs by 0
or 1), using that information to correctly identify to perform rotation operations.
- Highlight the advantages of using an ordered dictionary data structure (like a binary search tree) by using
one to implement a new data structure
This is a programming exercise which you will submit to gradescope. There is no written component to this
exercise, your code is your only submission.
For this exercise, you will need:
- Starter Code - which contains various classes that will be needed for this
assignment.
- Specification - which contains all instructions for what to do for
this assignment.