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燈, 水草

請輸入看板名稱,例如:e-shopping站內搜尋

TOP