/sorting_algorithms

Sorting algorithms implemented in C, including but not limited to: Bubble, Insertion, Quick, and Selection Sorts.

Primary LanguageC

Sorting Algorithms

This repository contains implementations of various sorting algorithms in C.

Algorithms Included

  • Bubble Sort
  • Insertion Sort
  • Quick Sort
  • Selection Sort

Usage

Each sorting algorithm is implemented in its own C file within the sorting_algorithms directory. To use any of these algorithms, you can directly run the pre-compiled executables or edit the source code and compile the file again.

Example Usage:

  1. Using Pre-compiled Executables:

    # Run the pre-compiled executable for Bubble Sort
    ./sorting_algorithms/bubble_sort
    
    # Output:
    # Original Array: 5 3 8 2 1
    # Sorted Array:   1 2 3 5 8
    

Contribution

Contributions to this repository are welcome! If you have an idea for improving an existing algorithm, implementing a new one, or optimizing performance, feel free to open a pull request.