https://github.com/vidojesevic/datastrlib
My implementation of various data structures in C
https://github.com/vidojesevic/datastrlib
hashmap linked-lists queues single-linked-list stacks
Last synced: 10 months ago
JSON representation
My implementation of various data structures in C
- Host: GitHub
- URL: https://github.com/vidojesevic/datastrlib
- Owner: vidojesevic
- License: mit
- Created: 2024-01-02T16:29:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T18:13:15.000Z (over 2 years ago)
- Last Synced: 2025-06-12T12:51:25.538Z (about 1 year ago)
- Topics: hashmap, linked-lists, queues, single-linked-list, stacks
- Language: C
- Homepage:
- Size: 1.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DATA STRUCTURE LIBRARY
This is my own implementation of various Data Structures in C language.
## Usage
1. Download .zip from this repository
2. Go to your project directory
```
cd your-project/
```
3. Unzip the files into your project directory
```
unzip ~/Downloads/datastrlib-main.zip
```
4. Create main.c and add these header files:
```
#include
#include "datastrlib-main/include/queues.h"
#include "datastrlib-main/include/stacks.h"
```
5. Compile with gcc
```
gcc -o user-project main.c -I datastrlib-main/include -L datastrlib-main/build -l:datastrlib.a
```
## Contributing
If you want to contribute to a project and make it better, your help is very welcome. Here is few guidelines to follow:
### How to make a clean pull request
1. Create a personal fork of the project on Github.
2. Clone the fork on your local machine.
3. Add the original repository as a remote called `upstream`.
4. Create a new branch to work on!
```
git checkout -b feature origin/feature
```
6. Develop new data structure
- If you are developing new data structure, create src/data_structure_name.c and include/data_strucrute_name.h. Those 2 files must be clean and containing only code related to that data structure.
- You can use custom main.c for testing your feature and don't forget to add that file inside .gitignore.
- Compile your changes:
```
make clean
make
```
- Compile test program
```
gcc -o user-project main.c -I include -L build -l:datastrlib.a
```
7. Create test cases
- Inside of tests/unit directory, create test cases for your work and run:
```
make test
```
8. Make changes
- If your tests passed, you can make changes:
```
git add .
git commit -m "Feature/Bugfix" -m "- Your meaningful commit message"
git push origin feature-or-fix-name
```
9. Create pull request
- Before submitting the pull request, ensure your fork is in sync with the upstream
10. Code rewiew
- Wait for code review and happy codding!
## License
This project is licensed under the MIT License. See the LICENSE file for details.