This repository contains sample implementations of fundamental Data Structures and Algorithms (DSA) in Python. It is designed to help you understand and practice key concepts in sorting algorithms.
The following sorting algorithms are implemented in this repository:
- Selection Sort: A simple comparison-based sorting algorithm.
- Bubble Sort: A basic sorting algorithm that repeatedly swaps adjacent elements if they are in the wrong order.
- Insertion Sort: A sorting algorithm that builds the sorted array one element at a time.
- Merge Sort: A divide-and-conquer algorithm that splits the array into halves, recursively sorts them, and then merges the sorted halves.
- Quick Sort: A highly efficient divide-and-conquer algorithm that partitions the array around a pivot element, recursively sorting the left and right subarrays.
- Heap Sort: A comparison-based sorting algorithm that uses a binary heap data structure to sort elements efficiently.
- Counting Sort: A non-comparison-based sorting algorithm that works by counting the occurrences of each element in the input array.
- Radix Sort: A non-comparison-based sorting algorithm that sorts numbers by processing individual digits. It works by sorting the numbers digit by digit, starting from the least significant digit to the most significant digit, using a stable sorting algorithm like Counting Sort as a subroutine.
Each algorithm includes test cases to demonstrate its functionality and correctness.