Skip to content

swaraj-das/DSA-Programs-with-C

Repository files navigation

DSA Programs with C

Welcome to the DSA Programs repository! This repository contains various programs demonstrating important data structure and algorithm (DSA) concepts implemented in C.

📂 Folder Structure

└── DSA-Programs-with-C/
    ├── README.md
    ├── LICENSE
    ├── Tower-of-Hanoi.c
    ├── Basic Array Operations/
    │   ├── Q2.c
    │   ├── Q3.c
    │   ├── Q4.c
    │   ├── Q5.c
    │   └── Deletion Operation/
    │       ├── array.c
    │       └── malloc.c
    ├── Linked List/
    │   ├── BubbleSorting_SLL.c
    │   ├── Circular_LinkedList.c
    │   ├── Double_LinkedList.c
    │   ├── LinkedQueue.c
    │   ├── LinkedStack.c
    │   ├── Polynomial_Add_SLL.c
    │   ├── Reverse_SingleLinkedList.c
    │   ├── Single_LinkedList.c
    │   └── josephusProblem.c
    ├── Queue/
    │   ├── circular-queue.c
    │   ├── dequeue.c
    │   ├── linearQ.c
    │   └── priorityQ.c
    ├── Searching Algorithms/
    │   ├── binary search/
    │   │   ├── binary_search-recursive.c
    │   │   └── binary_search.c
    │   └── linear search/
    │       ├── array.c
    │       ├── linearSearch.cpp
    │       └── malloc.c
    ├── Sorting Algorithms/
    │   ├── HeapSort.cpp
    │   ├── QuickSort.cpp
    │   ├── bubbleSorting.cpp
    │   ├── insertionSort.cpp
    │   ├── mergeSort.cpp
    │   └── selectionSort.cpp
    ├── Stack/
    │   ├── bin-to-dec.c
    │   ├── infix-to-postfix.c
    │   ├── postfix-evaluation.c
    │   ├── prefix-evaluation.c
    │   ├── reverse_string.c
    │   └── stack.c
    └── Tree/
        ├── non-recursiveBST.c
        └── recursiveBST.c

💻 Programs Overview

Basic Array Operations

  1. Q2.c, Q3.c, Q4.c, Q5.c - Various basic operations on arrays.
  2. Deletion Operation/array.c - Deletion operation in arrays with static memory allocation.
  3. Deletion Operation/malloc.c - Deletion operation in arrays using dynamic memory allocation.

Linked List

  1. Single_LinkedList.c - Implementation of a single linked list.
  2. Reverse_SingleLinkedList.c - Reversing a single linked list.
  3. Circular_LinkedList.c - Implementation of a circular linked list.
  4. Double_LinkedList.c - Implementation of a doubly linked list.
  5. BubbleSorting_SLL.c - Bubble sorting using a singly linked list.
  6. Polynomial_Add_SLL.c - Polynomial addition using singly linked list.
  7. LinkedQueue.c - Queue implementation using linked list.
  8. LinkedStack.c - Stack implementation using linked list.
  9. josephusProblem.c - Solution to the Josephus problem using a circular linked list.

Queue

  1. linearQ.c - Program showing insertion, deletion, and display of a linear array-based queue.
  2. circular-queue.c - Implementation of a circular array-based queue.
  3. dequeue.c - Implementation of a double-ended queue (deque).
  4. priorityQ.c - Priority queue implementation.

Stack

  1. stack.c - Basic stack operations implementation.
  2. reverse_string.c - Stack application for reversing strings.
  3. infix-to-postfix.c - Infix to postfix conversion using stack.
  4. postfix-evaluation.c - Postfix expression evaluation using stack.
  5. prefix-evaluation.c - Prefix expression evaluation using stack.
  6. bin-to-dec.c - Binary to decimal number conversion using stack.

Searching Algorithms

  1. Binary Search
  2. Linear Search
    • array.c - Linear search in arrays with static memory allocation.
    • malloc.c - Linear search in arrays with dynamic memory allocation using malloc().

Sorting Algorithms

  1. HeapSort.cpp - Implementation of Heap Sort.
  2. QuickSort.cpp - Implementation of Quick Sort.
  3. bubbleSorting.cpp - Implementation of Bubble Sort.
  4. insertionSort.cpp - Implementation of Insertion Sort.
  5. mergeSort.cpp - Implementation of Merge Sort.
  6. selectionSort.cpp - Implementation of Selection Sort.

Tree

  1. recursiveBST.c - Recursive implementation of Binary Search Tree operations.
  2. non-recursiveBST.c - Non-recursive implementation of Binary Search Tree operations.

Tower of Hanoi

  1. Tower-of-Hanoi.c - Recursive solution for the Tower of Hanoi problem.

🤝 Contribution Guidelines

Feel free to explore the repository and contribute! Here are a few ways you can contribute:

  • Add more programs or enhance existing ones.
  • Improve documentation and comments.
  • Optimize existing implementations.

Fork the repository, make your changes, and submit a pull request. Let’s make this repository a comprehensive resource for DSA with C!

📜 License

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


📬 Contact

For any questions or suggestions, feel free to reach out or create an issue. Happy coding! 🚀

About

Basic DSA Programs with (C <<90%) & (C++ <<10%)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published