Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.68 KB

File metadata and controls

33 lines (25 loc) · 1.68 KB

📚 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:)