This project is a culmination of my studies in 'Algoritmi E Principi Dell'Informatica' (Algorithms and Principles of Computer Science) during my bachelor's degree. It was a core component, contributing significantly to my final academic evaluation. The primary focus of this project was to design and implement efficient algorithms and data structures, demonstrating a strong understanding of computational performance.
Professor: Davide Martinenghi
I achieved the highest possible score, a 30L/30, by rigorously optimizing for both memory usage and execution time. This table summarizes the performance benchmarks:
| Score | Memory (MiB) | Time (s) | Result |
|---|---|---|---|
| 18 | 128 | 19 | ✅ |
| 21 | 118 | 15 | ✅ |
| 24 | 108 | 10 | ✅ |
| 27 | 98 | 6 | ✅ |
| 30 | 88 | 4 | ✅ |
| 30L | 78 | 1 | ✅ |
This project was developed using a standard set of robust tools:
| Category | Tool |
|---|---|
| IDE | VSCode |
| Compiler | gcc |
| Memory Profiling | Valgrind - Massif |
| Operating System | MacOS |
Curious to see the project specifications and my approach? You can explore the full details:
- Specification: Understand the problem statement and requirements in the specification document.
To replicate the 30L/30 score, your solution for test case 111 must execute in under 1 second and utilize less than 78 MB of memory.
Follow these simple steps to compile and test your code against the provided test cases (example uses test_1.txt):
- Compile:
make your_c_file(replaceyour_c_filewith your actual C file name). - Execute:
./your_c_file > output.txt < Tests/test_1.txt - Verify: Compare your generated
output.txtwith the expected output inTests/test_1.output.txtto check for correctness.
I'm open to collaborations, discussions, or any inquiries you might have regarding this project. Feel free to reach out!
This software is provided under the terms of the MIT License. For complete details, please refer to the LICENSE file.