[理工] [資結]-師大93-資教
Suppose that we have a file in which each record has 3 component keys
(k1,k2,k3). To sort these into lexicographic order, we decide to sort
the entire file by k3, then sort the entire file by k2, and finally
sort the entire file by k1. For this to work correctly, which sorts
must be done by stable sorting algorithms?
(A) The sort by k3
(B) The sort by k2
(C) The sort by k1
(D) Both (A) and (B)
(E) Both (B) and (C)
答案給D, 但我覺得是E (C不stable那前面都在排心酸的),
大家覺得?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.32.189.59
推
01/27 17:24, , 1F
01/27 17:24, 1F
推
01/28 17:11, , 2F
01/28 17:11, 2F
→
01/28 17:54, , 3F
01/28 17:54, 3F
→
01/28 17:56, , 4F
01/28 17:56, 4F