The mathematical definition of "partially sorted"

For example, insertion sorting is described as an efficient algorithm for partially sorted arrays. But how to define โ€œpartially sortedโ€ exactly?

+4
source share
1 answer

This is an array with several elements inappropriate. Without a percentage or other threshold, there is no strict difference between partially sorted and unsorted.

Formal Definition from Algorithms Robert Sedgewick and Kevin Wayne:

: , . , E X A M P L E 11 : E-A, X-A, X-M, X-P, X-L, X-E, M-L, M-E, P-L, P-E L-E. , , , , .

Wikipedia :

[...] A , K , . [...]

+5

All Articles