<p>I don't think it has a name, but it's described in this paper: <a href="https://arxiv.org/abs/2110.01111" rel="nofollow noreferrer">&quot;Is this the simplest (and most surprising) sorting algorithm ever?&quot;</a> Stanley P. Y. Fung</p>
Can someone explain me how this sorting algo is working, and what is the name of this algorithm?
<p>I have created a sorting function. Can I know the name of this algorithm? Is this bubble sort?</p>
<p>I am new in C.</p>
<pre><code>#include &lt;stdio.h&gt;

void sort(int *, int);

int main(void) {
    int arrayNum[] = {1, 12, 8, 4, 90, 11, 76};
    int len = sizeof(arrayNum) / sizeof(arrayNum[0]);
    sort(arrayNum, len);
    for (int i = 0; i &lt; len; i++) {
        printf(&quot;%d, &quot;, arrayNum[i]);
    }
    
    return 0;
}

void sort(int *array, int length) {
    int temp;
    for (int i = 0; i &lt; length; i++) {
        for (int j = 0; j &lt; length; j++) {
            if (array[i] &lt; array[j]) {
                temp = array[i];
                array[i] = array[j];
                array[j] = temp;
            }
        }
    }
}
</code></pre>