An open API service indexing awesome lists of open source software.

https://github.com/maverickpoly/asmr-c-dsa

Different Data Structures and Algorithms implemented purely in C
https://github.com/maverickpoly/asmr-c-dsa

algorithms c data-structures

Last synced: 2 months ago
JSON representation

Different Data Structures and Algorithms implemented purely in C

Awesome Lists containing this project

README

          

# ASMR C DSA: Data Structures and Algorithms

A comprehensive repository for Data Structures and Algorithms (DSA) implemented purely in **C**. This project contains efficient implementations of popular data structures and algorithms, designed for beginners and enthusiasts to learn and practice the art of problem-solving in C.

## 🚀 Features

### **Data Structures**

- **Linked List**: Singly Linked List.
- **Bool**: Boolean enum, and converting other data types to boolean.
- **Dict (dictionary)**: Inspired by Python's **dict** data type.
- **HashMap**: Dynamic Key-Value pairs with hashing.
- **String**: Dynamic String, like in Python.
- **Set**: Dynamic collection with unique values.
- **Queue**: FIFO (First In First Out).
- **Stack**: LIFO (Last In First Out).
- **Dynamic Array**: Dynamic array similar to **list** in Python and **vector** in C++.

### **Algorithms**

#### **Mathematical Algorithms**

- Prime Number.
- GCD and LCM.
- Fibonacci Sequence.
- Factorial.
- Mean, Sum, Max, Min.

#### **Searching Algorithms**

- Linear Search.
- Binary Search.

#### **Sorting Algorithms**

- Bubble Sort.
- Merge Sort.
- Quick Sort.
- Selection Sort.
- Insertion Sort.

---

## 📂 Repository Structure

```plaintext
asmr-c-dsa/

├── LinkedList/
├── HashMap/
├── Bool/
├── Dict/
├── DynamicArray/
├── LinkedList/
├── Queue/
├── Set/
├── Stack/
├── String/
├── Algorithms/
│ ├── Math/
│ ├── Searching/
│ ├── Sorting/
└── README.md
```

---

## 📖 How to Use

### Prerequisites

- **C Compiler**: Make sure you have GCC or any other standard C compiler installed.

### Clone the Repository

```bash
git clone https://github.com/MaverickPoly/asmr-c-dsa.git
cd asmr-c-dsa
```

### Compile and Run

Compile any file using GCC:

```bash
cd LinkedList && gcc tests.c linked_list.c -o main.exe && main.exe
```

---

## 🛠️ Future Plans

In the future, other complex data structures will be added, like _Trees_ and _Graphs_, along with algorithms, such as Dijkstra's, Kruskal's, and Prim's.

---

## 🙌 Contributions

Contributions are always welcome!

1. Fork the repository.
2. Create your feature branch (`git checkout -b feature/AmazingFeature`).
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`).
4. Push to the branch (`git push origin feature/AmazingFeature`).
5. Open a pull request.