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

https://github.com/yamtaldev/sortedlist

Efficient sorted list implementation in C using doubly linked lists and customizable element ordering.
https://github.com/yamtaldev/sortedlist

Last synced: 9 months ago
JSON representation

Efficient sorted list implementation in C using doubly linked lists and customizable element ordering.

Awesome Lists containing this project

README

          

# SortedList

This repository contains a C implementation of a sorted list data structure based on doubly linked list implementation provided also in the project. The implementation is organized into include, test, and src folders.

## Overview

This repository provides a C data structure implementation of a sorted list. It includes a set of files that make it easy to build, run, test, and clean the project.

# Getting Started

## Prerequisites

Before you begin, ensure you have the following prerequisites installed on your system:

### make: If you don't have `make` installed, you can download and install it from the official website:

- [Download make for windows](https://gnuwin32.sourceforge.net/packages/make.htm)
- [Download make for Linux and MacOS](https://www.gnu.org/software/make/)

### Download from the command line:

Linux:
```shell
$ sudo apt install make -y
```

MacOS:
```shell
$ brew install make
```

### gcc Compiler: If you don't have gcc installed, you can download and install it from the official website:
- [Download gcc](https://gcc.gnu.org/install/)

### Download from the command line:

Linux:
```shell
$ sudo apt update
$ sudo apt install build-essential
```

MacOS:
```shell
$ brew install gcc
```

Windows:
```shell
pacman -Syu
pacman -S mingw-w64-x86_64-gcc
gcc --version
```

## Installation

1. **Clone or Download the Repository:**
You can clone this Git repository or download it as a ZIP file to your local machine.

``` shell
$ git clone https://github.com/YamtalDev/SortedList.git
$ cd SortedList/test/sorted_list
```
2. **Compile and run the Project:**
Use make to compile the project:

``` shell
$ make
$ make run
```

## Project structure:

```shell

├── SortedList/
│ ├── bin/
│ │ ├── executables/
│ │ ├── objects/
│ │ ├── shared_libs/
│ │ └── static_libs/
│ |
| ├── include/
│ │ └── Header file
| |
│ ├── src/
│ │ └── src file
| |
│ ├── test/
│ │ ├── makefile
│ │ └──test file

```

## Usage

To compile, run, debug, or clean the project, you can use the provided Makefile
with the following commands:

- Simple compilation
```shell
$ make
```
- Running the project
```shell
$ make run
```
- Debugging the project
```shell
$ make debug
```
- Deleting all the .o, executables, shared/static libs files
```shell
$ make clean
```
- Checking valgrind on the project
```shell
$ make vlg
```

- Release compilation with optimization -O3
```shell
$ make release
```

These simple commands streamline the development process and make it easy to work
with each project in this repository.

## License:
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contact

For questions or issues, feel free to [create an issue](https://github.com/YamtalDev/SortedList/issues) or contact the project maintainer.

Connect with me:



linkedin logo discord logo slack logo github logo facebook logo medium logo