-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Szymon Skowroński edited this page Dec 11, 2023
·
4 revisions
The SortingMadness API is an application whose primary function is to sort data and allow the user to witness the difference in efficiency of various, most popular algorithms. Those include Quick Sort, Merge Sort, Selection Sort, Counting Sort, Insertion Sort, Bubble Sort.
No GUI provided, hence the only way of communicating with the API is through direct requests.

We support a variety of sorting algorithms:
-
Quick Sort:
- Quick Sort is a divide-and-conquer algorithm.
- It selects a "pivot" element and partitions the array into two sub-arrays.
- The process is applied recursively to the sub-arrays.
-
Merge Sort:
- Merge Sort is a divide-and-conquer algorithm.
- It divides the array into two halves, sorts each half, and merges them.
- Known for stability and has a time complexity of O(n log n).
-
Bubble Sort:
- Bubble Sort is a simple comparison-based algorithm.
- It repeatedly steps through the list, compares adjacent elements, and swaps if needed.
- Passes through the list until it's sorted.
-
Selection Sort:
- Selection Sort is an in-place comparison sorting algorithm.
- It divides the list into sorted and unsorted regions.
- Repeatedly selects the smallest (or largest) element and swaps it with the first unsorted element.
-
Insertion Sort:
- Insertion Sort builds the final sorted array one item at a time.
- It iterates through the array, comparing each element and inserting it into the correct position.
- Less efficient on large lists compared to other algorithms.
-
Counting Sort:
- Counting Sort is a non-comparison-based algorithm.
- Assumes the input consists of integers within a specific range.
- Counts occurrences of each element to reconstruct a sorted output array.
Each sorting algorithm has unique characteristics, advantages, and use cases. The choice depends on factors such as dataset size, stability requirements, and desired time complexity.