In this hands-on, we are going to solve two problems with segment trees. For each problem, we have a pdf with the description of the problem and a set of tests to check the correctness of your implementations.
- Problem Min and Max: Text and TestSet.zip
- Problem Queries and Opearations: Text and TestSet.zip
Submit
-
a file
lib.rs
and amain.rs
for each problem -
a file
Handson_02_solution_YOUR_NAME.pdf
to [email protected] by 23/11/2022. -
The
main.rs
file takes its input from stdin and produces its output to the stdout. This way we can use./solution < input1.txt | diff - output1.txt
to compare its output with the expected one on the first test case. -
A report
Handson_02_solution_YOUR_NAME.pdf
that briefly describes your solutions, your implementations, and an analysis of their time and space complexities. Add references to any relevant source you consulted to find your solutions or to develop their implementations.
Before submitting your solutions,
- make sure your implementation successfully passes all the tests.
- use
cargo fmt
to format your code. - use
cargo clippy
to check your code. - use Grammarly to improve your English and avoid tpyos :-). There is an extension for vscode.
Very important! You are allowed to discuss possible solutions with other students, BUT you have to implement all the solutions by yourself. Thus, sharing implementations with others is strictly forbidden.