Skip to content

Implementation of the most popular data structures in C/C++. I try to avoid over complicating anything so that I too can understand the fundamentals more easily.

Notifications You must be signed in to change notification settings

Murchoid/Data-Structures-implementatiion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“˜ Data Structures in C

A complete, well-organized and documented collection of core and advanced data structures implemented in C, for both learning and interview preparation.


πŸ“¦ Structure

Each data structure is implemented in its own folder with:

  • *.c – Implementation file
  • *.h – Header with declarations and structs
  • main.c – Example/demo usage
  • README.md – Description, operations, time/space complexities
  • CMakeLists.txt – Optional build file (per folder)

πŸ“‹ Table of Contents

  1. Implemented Structures
  2. Usage Guide
  3. Build Instructions
  4. Testing
  5. Contributing
  6. License

πŸ—οΈ Implemented Structures

πŸ”Ή Linear

  • Arrays (static/dynamic)
  • Singly Linked List
  • Doubly Linked List
  • Circular Linked List
  • Stack (Array & Linked List)
  • Queue (Array & Linked List)

πŸ”Ή Hashing

  • Hash Tables (Chaining & Open Addressing)
  • Set & Map via hashing

πŸ”Ή Trees

  • Binary Tree
  • Binary Search Tree
  • AVL Tree
  • Red-Black Tree
  • Segment Tree
  • B-Tree (Optional)
  • Trie

πŸ”Ή Heaps

  • Min Heap
  • Max Heap
  • Priority Queue (with Heap)

πŸ”Ή Graphs

  • Adjacency List / Matrix
  • BFS & DFS
  • Dijkstra’s Algorithm
  • Kruskal’s / Prim’s (MST)

πŸ”Ή Advanced

  • Disjoint Set (Union-Find)
  • Skip List
  • K-D Tree
  • Fenwick Tree (Binary Indexed Tree)
  • Sparse Table

πŸš€ How to Use

Clone the repo:

git clone https://github.com/Murchoid/data-structures-c.git
cd data-structures-c

Compile and run (using Make or CMake):

cd singly_linked_list
make
./singly_linked_list

OR

mkdir build && cd build
cmake ..
make

βœ… Testing Some folders include unit tests (using Check for C):

cd tests
make test

🀝 Contributing We welcome contributions:

New data structures

Edge case handling

Code clean-up

Documentation

πŸ™Œ Acknowledgments Inspired by CLRS and university-level DSA courses.

Big thanks to contributors and the open-source community.

✨ Happy Coding and Learning! ✨

About

Implementation of the most popular data structures in C/C++. I try to avoid over complicating anything so that I too can understand the fundamentals more easily.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •