The hottest sorting algorithm around!
Project description
Volcano Sort
The hottest sorting algorithm around!
Disclaimer
This algorithm runs in O(n2). Please don't use this.
Motivation
Our professor mentioned volcanoes when discussing sorting algorithms. I realized there wasn't a "Volcano Sort". There shouldn't be, but now there is.
Methodology
This algorithm first constructs a volcano from the input. Then, the volcano "erupts" and places the numbers in sorted order.
What does this mean?
Given the following input: [4,8,2,2,1,3,0], Volcano Sort will construct a volcano: [1,2,4,8,3,2,0]. It looks like this:
The volcano will erupt and place numbers in increasing order.
Output: [0,1,2,2,3,4,8]
Installation
pip install VolcanoSort
Usage
from VolcanoSort import volcano
arr = [4, 5, 8, 1, 2, 3, 7, 6, 9]
arr = volcano.sort(arr)
print(arr)
[1, 2, 3, 4, 5, 6, 7, 8, 9]
Future Development
None!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
VolcanoSort-1.0.4.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for VolcanoSort-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df09fce48c915446c3caff0d495afa3fc226a091cbde09449af03b00d1d55283 |
|
MD5 | ad87c0c4675641f5948df9a3713e961a |
|
BLAKE2b-256 | c39042dab537e59e7b33e7dc042ff73f410214402b7243fe734ad764161426b8 |