GitHunt
LA

Ladanividhi/Sorting-Algorithms

A collection of sorting algorithm implementations in C++. Includes Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, and Bucket Sort.

๐Ÿ“š Sorting-Algorithms

This repository contains implementations of various fundamental sorting algorithms in C++. These algorithms are widely used in computer science for ordering data efficiently and understanding algorithmic time complexities.

๐Ÿ”ง Algorithms Included

Algorithm File Name Description
Bubble Sort bubble_sort Repeatedly swaps adjacent elements if out of order
Selection Sort selection_sort Selects the minimum element and places it at the beginning
Insertion Sort insertion_sort Builds the sorted array one element at a time
Merge Sort merge_sort Divide and conquer algorithm with O(n log n) complexity
Quick Sort quick_sort Highly efficient, uses partitioning to sort
Bucket Sort bucket_sort Distributes elements into buckets and sorts individually

๐Ÿ“Œ Each file is a standalone C++ program.

๐Ÿ“ฅ How to Run

  1. Clone the repository:
    git clone https://github.com/Ladanividhi/Sorting-Algorithms.git
    cd Sorting-Algorithms
  2. Run the Compiled Program
    ./quick_sort
  3. Input Format:
    Enter the number of elements. Enter the elements separated by spaces or newlines.
  4. Output:
    The program will display the sorted array on the screen.

โœ… Final Thoughts

Understanding sorting algorithms is essential for mastering programming and computer science. This repository gives you a hands-on approach to explore how different sorting methods work and compare their efficiencies.

Thankyou for checking out my repository:)