Welcome to C-Data-Structures-Algorithms! This repository is a collection of fundamental data structures and algorithms implemented in the C programming language. The main goal of this project is to provide a clear and educational reference for students, developers, and programming enthusiasts who wish to understand these concepts from scratch. This project is still in development.
This project contains implementations of various common data structures and algorithms. Each implementation is designed to be as clear and didactic as possible, with explanatory comments in the code. The aim is to maintain a clean and consistent coding style throughout the project.
- Clear Implementations: Commented and easy-to-understand code.
- Educational Focus: Ideal for learning the fundamentals of data structures and algorithms.
- Modularity: Each data structure and algorithm is located in its own files for easy navigation.
- No External Dependencies: Only the C standard library is used.
Below is a list of the structures and algorithms you will find in this repository.
- Linked Lists
- Singly Linked List
- Doubly Linked List
- Circular Linked List
- Stacks
- Array-based Implementation
- Linked List-based Implementation
- Queues
- Array-based Implementation
- Linked List-based Implementation
- Trees
- Binary Search Tree (BST)
- AVL Tree
- Graphs
- Adjacency Matrix Representation
- Adjacency List Representation
- Search Algorithms
- Linear Search
- Binary Search
- Sorting Algorithms
- Bubble Sort
- Selection Sort
- Insertion Sort
- Quick Sort
- Merge Sort
- Graph Traversal
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Dijkstra Search
To compile and run any of the implementations, you will need a C compiler like gcc.
Make sure you have gcc installed on your system. You can check with the following command:
gcc --version- Clone this repository:
git clone https://github.com/Raquezin/C-DSA.git- Navigate to the project directory:
cd C-DSA- Navigate to the folder of the data structure or algorithm you want to test:
cd folder- Compile the
.cfile along with itsmain.ctest file:
gcc -o my_program main.c stack_array.c -Wall -Wextra -pedantic- Run the compiled program:
./my_programContributions are welcome! If you wish to contribute to this project, please follow these steps:
- Fork this repository.
- Create a new branch (
git checkout -b feature/new-feature). - Make your changes and commit them (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature/new-feature). - Open a Pull Request.
- [Fernando] - Raquezin
This project is licensed under the MIT License. See the LICENSE file for more details.