|
本帖最后由 屁眼儿 于 2020-4-27 19:41 编辑
下面是转换的文字
The letters of the word WRAP form the list (si)1..4 = (W,R,A,P). This list is to be sorted
into alphabetical order using Selection sort. For demonstration purposes, the sorting
is to be achieved by progressively modifying an index function rather than by shuffling
members of the list itself. All possible index functions are listed in permutation form
below; (e.g. (1)=2; (2)=3; (3)=1; (4)=4). Refer to functions by Greek letter1.
(a) Before sorting starts, the index function is initialized to .
(b) After the 1st use of the Least Element algorithm the index function becomes .
(c) After the 2nd use of the Least Element algorithm the index function becomes .
(d) After the 3rd use of the Least Element algorithm the index function becomes .
(e) During the 1st use of the Least Element algorithm, the number of diernt values
taken by the least-element-so-far index marker m is .
(f) The number of comparison operations used for the entire Selection sort is . |
|