This repository contains implementations of fundamental Data Structures and Algorithms (DSA) in the C programming language.
It is designed as a reference and practice resource for students, beginners, and anyone preparing for coding interviews.
DSA-Algorithms-main/
├── basics/
│ ├── array_search.c
│ ├── fibonacci_recursive_series.c
│ ├── fibonacci_swapping.c
│ ├── linked_list.c
│ ├── queue_using_array.c
│ ├── queue_using_linkedlist.c
│ ├── stack_using_array.c
│ └── stack_using_linkedlist.c
│
├── searching_algorithms/
│ ├── Binary_Search.c
│ ├── Linear_Search_sorted.c
│ └── Linear_Search_unsorted.c
│
├── sorting_algorithms/
│ ├── bubble_sort.c
│ ├── insertion_sort.c
│ └── merge_sort.c
│
└── README.md
Note:
.exefiles are compiled outputs and can be ignored.
To run the programs, you need a C compiler such as gcc.
On Linux/macOS, you can install GCC using:
sudo apt-get install build-essential # Ubuntu/Debian
brew install gcc # macOS (Homebrew)On Windows, you can use MinGW or an IDE like Code::Blocks or Dev-C++.
To compile and run a C program:
gcc filename.c -o program
./programExample:
gcc basics/linked_list.c -o linked_list
./linked_list- Basics: Arrays, Fibonacci series, Linked List, Stack, Queue
- Searching Algorithms: Linear Search (sorted & unsorted), Binary Search
- Sorting Algorithms: Bubble Sort, Insertion Sort, Merge Sort
- Clear and simple C implementations
Compile and run a sorting algorithm:
gcc sorting_algorithms/merge_sort.c -o merge_sort
./merge_sortRun a searching algorithm:
gcc searching_algorithms/Binary_Search.c -o binary_search
./binary_search