https://github.com/zgr3doo/sorting-exercises
Sorting exercises to practice for fun
https://github.com/zgr3doo/sorting-exercises
Last synced: 8 months ago
JSON representation
Sorting exercises to practice for fun
- Host: GitHub
- URL: https://github.com/zgr3doo/sorting-exercises
- Owner: zgr3doo
- Created: 2023-11-18T16:04:07.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-18T16:43:27.000Z (over 2 years ago)
- Last Synced: 2024-12-29T07:27:04.580Z (over 1 year ago)
- Language: Java
- Size: 421 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sorting exercises
### Bubble Sort
* [Wikipedia article about - Bubble Sort](https://en.wikipedia.org/wiki/Bubble_sort)
The earliest description of the Bubble sort algorithm was in a 1956 paper by mathematician and actuary Edward Harry Friend.
Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the input list element by element, comparing the current element with the one after it, swapping their values if needed. These passes through the list are repeated until no swaps had to be performed during a pass, meaning that the list has become fully sorted. The algorithm, which is a comparison sort, is named for the way the larger elements "bubble" up to the top of the list.

### Insert Sort
* [Wikipedia article about - Insert Sort](https://en.wikipedia.org/wiki/Insertion_sort)
Insertion sort iterates, consuming one input element each repetition, and grows a sorted output list. At each iteration, insertion sort removes one element from the input data, finds the location it belongs within the sorted list, and inserts it there. It repeats until no input elements remain.

### Quick Sort
* [Wikipedia article about - Quick Sort](https://en.wikipedia.org/wiki/Quicksort)
Quicksort was developed by British computer scientist Tony Hoare in 1959 and published in 1961.
Quicksort is a type of divide-and-conquer algorithm for sorting an array, based on a partitioning routine; the details of this partitioning can vary somewhat, so that quicksort is really a family of closely related algorithms. Applied to a range of at least two elements, partitioning produces a division into two consecutive non empty sub-ranges, in such a way that no element of the first sub-range is greater than any element of the second sub-range.

### Merge Sort
* [Wikipedia article about - Merge Sort](https://en.wikipedia.org/wiki/Merge_sort)
Merge sort is a divide-and-conquer algorithm that was invented by John von Neumann in 1945.
Conceptually, a merge sort works as follows:
* Divide the unsorted list into n sublists, each containing one element (a list of one element is considered sorted).
* Repeatedly merge sublists to produce new sorted sublists until there is only one sublist remaining. This will be the sorted list.
