This is the project that I did during my first Computer Science academic year. The goal was to implement fast sorting algorithms such as QuickSort, MergeSort and HeapSort. For that reason, I've built an application using Qt for the GUI that can be run inside a Docker container. It allows users to sort integers, see sorted data and sorting metrics.
- Sorting algorithms: Supports QuickSort, MergeSort, and HeapSort.
- Array input: Users can manually input arrays or generate random arrays with specified size and range.
- See metrics: Displays detailed metrics including array size, number of swaps, memory usage, and sorting time.
- Save metrics: Ability to save sorting metrics to a CSV format.
Click 'Info' button to see details how application works.
Example of generation random array, sorting and saving metrics:
- Docker: Follow the instructions on the Docker website to install Docker.
- VcXsrv (X Server for Windows): Download and install VcXsrv from SourceForge.
git clone https://github.com/yulianzavodnyk/Sorting-App.git
cd Sorting-App
- Launch VcXsrv from the Start menu.
- Configure the display settings:
- Multiple windows
- Display number: 0
- Start no client
- Check 'Disable access control'
Set DISPLAY Environment Variable:
$env:DISPLAY="host.docker.internal:0.0"
docker build -t first_year_cs_coursework .
docker run -it --rm -e DISPLAY=host.docker.internal:0.0 -v /tmp/.X11-unix:/tmp/.X11-unix first_year_cs_coursework
or if you prefer using Docker Compose you can run
docker-compose up --build
- Ensure VcXsrv is running before starting the Docker container.
- The DISPLAY environment variable and Docker volume for X11 are necessary for GUI display.
- Remember that when you are saving metrics, it will be saved inside docker container.
This project is licensed under MIT License. Check LICENSE for details.