Skip to content

jaugustodev/Sorting-Algorithms

Repository files navigation

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!

About

This repository contains implementations of several fundamental sorting algorithms, including Selection Sort, Bubble Sort, Insertion Sort, Merge Sort, and Quick Sort. Each algorithm is implemented in a separate file to make it easy to understand and experiment with.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages