Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.
/ aed_23-24 Public archive

Exercises of Algorithms and Data Structures

Notifications You must be signed in to change notification settings

juacmola/aed_23-24

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Exercises of Algorithms and Data Structures


Disclaimer

The project is intended for educational purpose only.


Contents


Introduction

This repository contains the exercises of the course of Algorithms and Data Structure. The course is part of the Degree of Computer Science of the University of Murcia (Universidad de Murcia). This course is being taught in the first semester of the second year of the degree. In this case, our participation in the course was in the academic year 2023/2024. The course was taught by the professor Jesús Sánchez Cuadrado.

It is divided into three projects and some exercises. We attached both the code and the report of each exercise. As you can see, we have used C++ programming language to solve the exercises. The OS is Linux, and we used the terminal to compile and run the programs. The IDE used was Visual Studio Code.

When we wanted to submit our projects and exercises, our professor provided us a website. This website is called Mooshak and is able to correct our programs.

The reports and the code comments are written in Spanish. If you have any questions, please do not hesitate to contact us.

Back to contents


How to Use the Projects

In this case, we have used Visual Studio Code to develop the exercises, but you can use another IDE. The language is Maude and C++. The OS is Linux. The terminal is used to compile and run the programs. For the Maude exercise you do not need the terminal, just open the documents and the report. To run the exercises, you can follow the following steps:

  1. Download the repository. Click the 'Code' button and download the ZIP file: Download ZIP
  2. Unzip the file in the folder you want.
  3. Open the terminal in the folder.
  4. For comodines and Grafos exercises, you can compile the program with the command g++ bishop.cpp -o bishop and run it with ./bishop (changing the name of the files in each case).
  5. For wordCorrector project, follow the instructions that you will find in the Word Corrector section.

Back to contents


Projects & Exercises

In this section, they will appear in order of the submission date.

You can find the exercises here: folder. The purpose of these exercises was to get some extra points in the course.

  • bishop - This exercise is about the bishop piece of chess. The program receives the initial position of the bishop and the final position. The program must determine the number of positions the bishop will make to finish in the final position.

  • naranjasopistachos - In this exercise, the player must write down in the terminal the kilometer where he starts and the type of stand (oranges or pistachios). The program must determine which type of stand he will find if he drive the kilometers that the player has written.

  • winterishere - Lastly, players can write down one day of the calendar, and the program will determine if winter has come.

In this little project, we learned how to create sentences in the Maude language. So, there are fourteen tests (some were about natural numbers and others about different kinds of group data, as lists, queues, stacks, etc). Each test it is explained in the report. As I said earlier, the reports are written in Spanish, but it is easy to understand the purpose of each test. The dates of teh report are from 2021 because I did not pass the course at the first attempt, but I did it in 2023/2024.

The Word Corrector project was the longest by far. It is divided in four sections, where the difficulty increase in each one. Overall, we were reconstructing a dictionary and correcting words. Mooshak (the webpage with all the statement exercise), gave us the instructions of the project. There were some mandatory parts of the project and also some optional features (it was in our hand to choose which one to implement). Section 1 helped us to get the basic structure of the project. Section 2 implements a hash table and an Anagram feature(this was optional). Section 3 implements a trie tree and a 'stretch words' feature (also optional). The most important section is the fourth one (it implements both the hashing and the trie tree).

If you want to try section 4, I have attached inside the folder some input and output files. After you have downloaded the folder (.zip) and unzip it, follow the next steps:

  1. Open the terminal in the folder.
  2. Write all the commands that appear in the image: terminal What we are doing here is to compile the program and run it. The program is made by different classes (the name of those classes appear in the image). When we write make, the Makefile file is compiling all the classes and creating an executable file (a.out). After that, we run the program with the command ./a.out and we add the input (204b.in) and the file where the program will write the output (output). Finally, we compare the output with the expected output (204b.out). As you can see, the output is correct because it has the same result. You can see the result in the file output.

To learn how to make graph algorithms, I made four problems. Some of the algorithms were shown in class, but they are recognizable to many people. In the report are the instructions of how I solved them.

Back to contents


Credits

The project was developed by the following people:

We counted with the supervision of our professor Jesús Sánchez Cuadrado (LinkedIn) (Investigation Web).

For the submission of the extra exercises, we entered in Olimpiada Programación. For the submission of the projects, we entered in Mooshak.

Lastly, this is part of one of the courses of the Degree of Computer Science of the Universidad de Murcia - (Universidad de Murcia).

Back to contents


License

This project has the default copyright license. That means that no one may reproduce, distribute, or create derivative works from our work.

Back to contents


README.md created with ❤️ by juacmola