Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 917
a13e Avatar asked Dec 19 '22 09:12

a13e


1 Answers

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.

like image 160
Paul Hankin Avatar answered Jan 25 '23 23:01

Paul Hankin