Skip to content

A collection of Data Structures and Algorithms (DSA) implemented in C, covering fundamental concepts like arrays, linked lists, stacks, queues, trees, graphs, sorting, searching, and more.

Notifications You must be signed in to change notification settings

AbdullahAli2005/Data-Structures-and-Algorithms-in-C-Language

Repository files navigation

Data Structures and Algorithms in C Language

Welcome to the C DSA repository! This collection showcases implementations of various data structures and algorithms written in C. It serves as a resource for learners, developers, and enthusiasts who want to explore DSA concepts and their practical applications in C programming.


Repository Structure

The repository is organized into the following categories, each containing relevant implementations:

  • Arrays: Operations and algorithms related to arrays.
  • Graphs: Algorithms like BFS, DFS, and graph traversal techniques.
  • Linked List: Implementations of singly, doubly, and circular linked lists.
  • Queues: Queue data structures, including circular and priority queues.
  • Trees: Binary trees, AVL trees, and traversal algorithms.
  • Searching Algorithms: Binary search, linear search, and other searching techniques.
  • Sorting Algorithms: Merge sort, quicksort, bubble sort, and more.

Each folder contains the relevant C files implementing the data structures and algorithms.


Note on File Naming

The files in this repository are named with a numbering system, such as 25_Merge_Sort.c and 31_Depth_First_Search.c. This numbering reflects the sequence in which I studied and implemented these concepts. If you are new to DSA, this numbering may provide a helpful learning order—but feel free to explore them in any sequence!

Explore the folders to find the implementations you are interested in. Each folder contains a README.md file explaining the algorithms or data structures in detail.


How to Run the Programs

Prerequisites

You need a C compiler to run the programs. Popular options include:

  • GCC (GNU Compiler Collection)
  • Turbo C++
  • Online IDEs like replit or OnlineGDB.

Compilation and Execution

To compile and execute a C program:

  1. Navigate to the folder containing the desired .c file.
  2. Use the following commands:
    gcc filename.c -o output
    ./output

🚀 Clone the Repository

To clone this repository and get started:

git clone https://github.com/YourUsername/C-DSA.git
cd C-DSA

Contributing

Contributions are welcome! If you have a new implementation or improvement, feel free to submit a pull request.

Steps to Contribute:

  1. Fork this repository.
  2. Clone your forked repo:
    git clone https://github.com/your-username/C-DSA.git
  3. Create a new branch:
    git checkout -b feature-branch-name
  4. Make your changes and commit them:
    git commit -m "Add new feature or fix"
  5. Push your changes to your fork:
    git push origin feature-branch-name
  6. Create a Pull Request on the main repository.

👩‍💻 Author

Abdullah Ali


License

This repository is licensed under the MIT License. See the LICENSE file for details.

About

A collection of Data Structures and Algorithms (DSA) implemented in C, covering fundamental concepts like arrays, linked lists, stacks, queues, trees, graphs, sorting, searching, and more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages