https://github.com/augustodevjs/sorting-algorithms
Sorting Algorithms using C#.
https://github.com/augustodevjs/sorting-algorithms
Last synced: 4 months ago
JSON representation
Sorting Algorithms using C#.
- Host: GitHub
- URL: https://github.com/augustodevjs/sorting-algorithms
- Owner: augustodevjs
- License: mit
- Created: 2024-07-05T01:28:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-07T15:53:23.000Z (over 1 year ago)
- Last Synced: 2025-02-22T01:41:21.293Z (10 months ago)
- Language: C#
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Sorting Algorithms
This repository contains implementations of various sorting algorithms. These algorithms are fundamental for understanding data structures and algorithms. Below is a brief explanation of each algorithm included:
### 1. Selection Sort
Selection Sort repeatedly finds the minimum element from the unsorted part of the array and swaps it with the first unsorted element. This process continues until the entire array is sorted. It's easy to implement but not very efficient for large datasets.
### 2. Bubble Sort
Bubble Sort repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. The process repeats until no swaps are needed. This algorithm is simple but has poor performance for large lists.
### 3. Insertion Sort
Insertion Sort builds the final sorted array one item at a time. It takes each element from the input and finds the correct position within the sorted part of the array. This algorithm is efficient for small datasets or nearly sorted arrays.
### 4. Merge Sort
Merge Sort is a divide-and-conquer algorithm that divides the array into halves, recursively sorts each half, and then merges the sorted halves back together. It has good performance and is suitable for large datasets.
### 5. Quick Sort
Quick Sort is also a divide-and-conquer algorithm. It selects a 'pivot' element and partitions the array into elements less than and greater than the pivot. It then recursively sorts the partitions. Quick Sort is efficient and commonly used, but its performance depends on the pivot selection.
### Author
This project was created by João Augusto.
Feel free to explore the code and experiment with the different sorting algorithms. Each algorithm is implemented in a separate file for clarity and ease of understanding.
Happy coding!