A comprehensive C application using GTK+ 3 to visualize and interact with various core computer science data structures and algorithms. This project provides an interactive graphical interface for sorting arrays, managing linked lists, manipulating trees, and traversing graphs.
The application is divided into four main modules accessible via tabs:
- Visual Sorting: Watch sorting algorithms in action.
- Algorithms Implemented:
- Bubble Sort
- Insertion Sort
- Shell Sort
- Quick Sort
- Performance Analysis: Benchmark different algorithms.
- Interactive Management: Create and modify Singly and Doubly linked lists.
- Visual Operations:
- Insert (Head, Tail, Specific Position)
- Delete nodes
- Sort the list
- Visualization: Graphic representation of nodes and pointers.
- Structures:
- Binary Search Trees (BST)
- N-ary Trees
- Operations:
- Insertion and Deletion
- Tree Balance metrics
- Traversals:
- Pre-order (Préordre)
- In-order (Inordre)
- Post-order (Postordre)
- BFS (Breadth-First Search)
- Conversion: Tools to transform N-ary trees to Binary trees.
- Graph Construction:
- Create Nodes by clicking
- specific Edges (Directed/Undirected)
- Dynamic Adjacency Matrix
- Algorithms:
- Dijkstra's Algorithm
- Bellman-Ford
- Floyd-Warshall (All-pairs shortest path)
To build and run this project, you need:
- GCC (GNU Compiler Collection)
- Make
- GTK+ 3.0 development libraries (
libgtk-3-devon Debian/Ubuntu,gtk3on MSYS2/Windows) - pkg-config
-
Clone the repository and navigate to the project folder:
git clone https://github.com/your-username/sorter-project.git cd sorter-project -
Build the project using Make:
make
-
Run the application:
./sorter.exe
Open SorterProject.cbp in Code::Blocks and click "Build and Run". Ensure your global compiler settings have the correct GTK+ 3 include and linker paths set up.
SorterProject/
├── src/
│ ├── backend/ # Implementation of algorithms (C logic)
│ ├── gui/ # GTK+ interface code
│ └── main.c # Entry point
├── include/ # Header files
├── style.css # UI Styling
├── Makefile # Build script
└── SorterProject.cbp # Code::Blocks project file
The application interface is styled using style.css. Ensure this file is present in the working directory when running the executable to load the custom visual themes.