作者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