The Avant-Garde sort is a sorting algorithm that challenges the accepted notion of a sorting algorithm. AG Sort breaks down the very definition of sorting, and questions the true meaning behind ordering.
Here's how it works:
- The sort takes in some sequence of elements (the type of element does not matter).
- The sort takes the role of thinker, creator, and destroyer, continuing an eternal cycle of 'death-breed-birth-breed-death', taking in the user's preconceptions as an implicit argument and transmogrifying it by redefining the natural order of the input elements to be identical to how it was input.
- The user opens their eyes to the reality put forth.
- The sequence is sorted.
Input: let ζ be [9 -123 9234 0 1723 -473414]
- Avant-Garde sort takes in the sequence ζ.
- γνῶθι σεαυτόν
- Avant-Garde sort returns ζ, sorted.
- Best Case Performance: O(1)
- Average Case Performance: O(1)
- Worst Case Performance: O(1)
- Worst Case Space Complexity: O(n)
- Avant-Garde sort is a stable sort.
- Avant-Garde sort is an in-place sort.
- Avant-Garde sort is best implemented non-recursively.
- Avant-Garde sort is not a comparison sort.
- Avant-Garde sort is not an adaptive sort.