TransCSI 板


LINE

※ 引述《antirazin (你今天督了吗XD)》之铭言: : 以下是我对自己的答案有质疑的部份的部份: : 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).....) : 不过我认为结果应该是一样的,不知道大大们是否跟我觉得一样? icant大大表示答案应该是 (n-1)+(n-2)+(n-3)+......+2+1 也就是(1+(n-1))*(n-1)/2 = n*(n-1)/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...... : 一样苦手= =" 救救小的吧~ 第4题经过icant大大的相助,小的打了以下的演算法 给一整数 X While(X>1) { N=X PROCEDURE PRIME(int N) { if(N%2==0) PRIME(N/2); else if(N%3==0) PRIME(N/3); else if(N==1) print(X) } X++ } 不知道可不可以这样写?0.0 顺道一提,我想问问各位大大,他如果只是要你写演算法, 是不是表示可以像上面一样不用写出正式的程式码,只要表示程式是怎麽进行就好, 请问是不是这个样子? --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 125.228.83.133
1F:→ stevennick:演算法喔,可以Pseudocode写出就好,不用到写程式啦 06/05 23:33
2F:→ stevennick:可是要看清楚题目,我考试的时候题目几乎都有要求 06/05 23:37
3F:→ stevennick:用指定的程式语言实做。 06/05 23:39
4F:→ antirazin:糟糕好像写错了 我改一下@@ 06/05 23:41
※ 编辑: antirazin 来自: 125.228.83.133 (06/05 23:43) ※ 编辑: antirazin 来自: 125.228.83.133 (06/06 00:53) ※ 编辑: antirazin 来自: 125.228.69.60 (06/06 01:14)







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:WOW站内搜寻

TOP