This repository contains a collection of C programs implementing various fundamental data structures and algorithms. It serves as a practical resource for understanding and applying common DSA concepts.
Here is a list of the data structures and algorithms implemented in this project:
- Arrays (
arrays.c)- Implements basic array operations: insert, delete, display, and search.
- Stacks (
stack-operations.c)- Implements core stack operations (push, pop, etc.).
- Circular Queues (
circular-queue.c)- Implements a circular queue with enqueue, dequeue, and display functions.
- Linked Lists
- Singly Linked List (
sll-insertions.c): Functions for various insertion operations. - Doubly Linked List (
dll-insertions.c): Implementation with insertion and display functions. - Circular Linked List (
cll-insertions.c): Implementation of a circular linked list.
- Singly Linked List (
- Trees
- Binary Search Tree (
bst.c): Implementation of a BST with different traversal methods.
- Binary Search Tree (
- Hash Tables (
hashtables.c)- A basic implementation of a hash table.
- Infix to Postfix Conversion (
infix-postfix.c)- A program to convert an infix expression to its postfix equivalent.
- Dijkstra's Algorithm (
dijkstra.c)- An implementation of Dijkstra's single-source shortest path algorithm.
To compile and run these programs, you will need a C compiler installed on your system (e.g., gcc).
-
Clone the repository:
git clone [https://github.com/DEMiHAT/data-structures-fundamentals](https://github.com/DEMiHAT/data-structures-fundamentals) cd data-structures-fundamentals -
Compile a program: Use
gcc(or your preferred C compiler) to compile the desired.cfile.# Example for the Binary Search Tree gcc bst.c -o bst # Example for Dijkstra's Algorithm gcc dijkstra.c -o dijkstra
-
Run the executable: After compilation, run the generated executable file.
# Example for the Binary Search Tree ./bst # Example for Dijkstra's Algorithm ./dijkstra
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the terms specified in the LICENSE file.