algorithmsorting

Why do we use the term "non-descending" instead of "ascending" in sorting algorithms?


In the sorting algorithms like heapsort or quicksort, why do standard publications or research papers prefer the term "non-descending" or "non-ascending" when they can simply use ascending or descending respectively? I mean anyways the meaning is going to be the same.


Solution

  • Non-ascending (and non-descending) include the possibility of adjacent terms being equal. [1, 2, 2] is non-descending, but isn't ascending.

    But the publications you are reading probably define their terms.