作者antirazin (你今天督了嗎XD)
看板TransCSI
標題[問題] 93-FJU-資工計概
時間Tue Jun 5 15:32:28 2007
以下是我對自己的答案有質疑的部份的部份:
1.下列那一種bus連接CPU和MEMORY?
(a)data (b) address (c) control (d)以上皆是
我選(D)
2.The precison of the fractional number stored in a computer is
defined by the _____
(a)sign (b)exponent (c)mantissa (d)any of the above
我選(C)
3. What's the status of a process when the process is reading data from
the disk.
(a)ready (b)wait (c)running (d)none of the above.
我選(B)
4. The following algorithm for sorting a list is called the bubble sort
How many comparisons between list entries does the bubble sort require
when applied to a list of n entries?
procedure BubbleSort(List)
Counter←1;
N←the number of entries in List;
while(Counter<N)do
{
while(N>1)do
{if (the Nth List entry is less than the entry preceding it)
then(interchange the Nth entry with the preceding entry))
N←N-1
}
}
我的答案是n^2
另外有疑問的是他這邊的Bubble Sort 感覺是走相反路線
(它從最後面兩個開始比起,不過一般應該是先從前面12個開始比然後再23、34....,
而他卻是N和(N-1)、(N-1)和(N-2).....)
不過我認為結果應該是一樣的,不知道大大們是否跟我覺得一樣?
2.Design a procedure to compare the contents of two stacks.
這一題我苦手,請高手解答
3. a. A rough draft of a speech
b. A file of dentist's patient records
c. A mailing list
d. A reference file of 50000 words and their definitions
以上這四個case分別用以下檔案結構中的哪一種去做最好,請說出原因
(sequential , text , index, or hash)
a.我選text,原因很爛,因為演講用的草稿一般都是用text打出來的(....)
b.我選index,原因是在調閱病人的紀錄時,應該是以病人的名字作為索引碼
c.我選sequential,原因是信件都是一封一封按照順序收入的
d.我選hash,其存取演算法應該是這些字它們定義之間的關係去設計的
4.Design an algorithm to generate the sequence of positive integers(in increasing order)whose
only prime divisors are 2 and 3; that is , your program should produce the sequence
2,3,4,6,9,12,16,18,24,27......
一樣苦手= =" 救救小的吧~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.228.83.133