Collection of algorithm and data structure exercises for the Algorithms and Data Structures (AED) course. Includes LeetCode style problems, class assignments, and multiple from-scratch implementations.
This repository gathers C++ solutions used to practice algorithms and data structures. You will find worked examples, personal experiments, evaluation material, and reference implementations of classic structures.
| Path | Description |
|---|---|
arrayExercises/ |
Array-focused problems and warm-up algorithms (LeetCode inspired). |
EC*/ |
Short evaluations from the course (for example EC1, EC7, EC11). |
REC/, Partial/ |
Review sessions, partial exams, and complementary exercises. |
LinkedListTask/, IteratorsQuest/ |
Linked list variants and custom iterator implementations. |
bstImplementation/, btree/, bTreeImplementation/, proyectRedBlackTree/ |
Binary search trees, B-Trees, and Red-Black Tree projects. |
HashImplementation/, dictionariesTask/ |
Hash tables and dictionary-based structures. |
graphImplementation/ |
Graph abstractions and traversal utilities. |
sparseMatrixImplementation/ |
Sparse matrix algorithms and helpers. |
TrainStringMatching/, stringMatching.md |
String matching practice sets and notes. |
Miscellaneous files (backtracking.cpp, btree.md, etc.) |
One-off exercises or in-class guides. |
Several directories contain compiled binaries (
main,main.exe). Remove them after compiling to keep the tree tidy.
- C++ compiler with C++17 support (GCC, Clang, or MSVC).
- C++ standard library.
- Optional: build tooling such as
cmakeormakeif you prefer custom build scripts.
- Clone the repository:
git clone https://github.com/stiffis/aed-exercises.git cd aed-exercises - Enter the folder that contains the exercise you want to run:
cd arrayExercises - Compile and execute the desired source file:
g++ containsDuplicate.cpp -std=c++17 -O2 -o containsDuplicate ./containsDuplicate
Adjust compiler flags or the C++ standard as required by each exercise.
- Arrays and strings
- Linked lists and dynamic structures
- Binary search trees, B-Trees, and Red-Black Trees
- Hash tables and dictionary ADTs
- Graphs, traversals, and shortest paths
- Recursion, backtracking, and dynamic programming
- String matching algorithms and advanced data structures (sparse matrices, disjoint sets, etc.)
Contributions are welcome! You can add new exercises, propose alternative solutions, or suggest documentation improvements.
Recommended workflow:
- Fork this repository.
- Create a feature branch:
git checkout -b feature/new-solution. - Commit and push your changes:
git commit -m "Add new solution"followed bygit push origin feature/new-solution. - Open a pull request describing your changes, test results, and any relevant notes.
This project is distributed under the GNU GPL v2. Refer to LICENSE for the full terms.
Questions or suggestions? Open an issue or email steve.ildefonso@utec.edu.pe.