algorithmica icon indicating copy to clipboard operation
algorithmica copied to clipboard

The description of the sorting algorithm by inserts does not correspond to the algorithm itself

Open rwqwr opened this issue 3 years ago • 0 comments

The description of the insert sorting contains: Когда это произойдет, это будет означать, что он будет больше всех элементов слева и меньше всех элементов префикса справа, but the fragment of the algorithm contains the condition: a[i - 1] < a[i], which is incorrect in terms of definition and sorts arrays in descending order.

rwqwr avatar Oct 07 '22 17:10 rwqwr