/AvantGardeSort

A new sorting algorithm that runs in O(1) time.

Primary LanguageJava

Avant Garde Sort

A new sorting algorithm that runs in O(1) time.

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:

  1. The sort takes in some sequence of elements (the type of element does not matter).
  2. 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.
  3. The user opens their eyes to the reality put forth.
  4. The sequence is sorted.

An Example

Input: let ζ be [9 -123 9234 0 1723 -473414]

  1. Avant-Garde sort takes in the sequence ζ.
  2. γνῶθι σεαυτόν
  3. Avant-Garde sort returns ζ, sorted.

Algorithmic Complexity

  • Best Case Performance: O(1)
  • Average Case Performance: O(1)
  • Worst Case Performance: O(1)
  • Worst Case Space Complexity: O(n)

Other Facts

  • 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.