[問題] 一堆問題...沒辦法..考試快到了咩(茶)

看板TransCSI作者 (今年是日星來台年~真嗨)時間18年前 (2007/06/24 10:32), 編輯推噓10(10010)
留言20則, 6人參與, 最新討論串1/2 (看更多)
1. The following table represents a tree stored in a machine's memory. Each node of the tree consists of three cells. The first cell contains the data (a letter),the second contains a pointer to the nodes's left child , and the third contains a pointer to the node's right child. A value of 0 represents a NULL pointer. If the value of the root pointer is 55 , draw a picture of the tree. Address Contents 40 G 41 0 42 0 43 X 44 0 45 0 46 J 47 49 48 0 49 M 50 0 51 0 52 F 53 43 54 40 55 W 56 46 57 52 ------------------------------------------------------------------------- 2. 想問一下Insertion Sort 的比較次數最差狀況是(n-1)*n/2還是n*(n+1)/2 (兩者差在第一個數有沒有跟負無限大做比較,若有,則是n*(n+1)/2,反之, 就是前者),不知道通常計算時比較的底值有沒有包含負無限大這一項, 還是直接拿第一個數字做比較? ------------------------------------------------------------------------- 3. An incremnetal backup copies________. (A)all program and data files. (B)only the files that have changed since the last full backup (C)only the files that have changed since the last incremental backup (D)only the files that have changed since the last full backup or differential backup (E)only the files that have changed since the last full backup or incremental backup -------------------------------------------------------------------------- 4. Let A(mxn) and B(nxm) be two matrixs. Please write a pseudocode to compute A(mxn)*B(nxm). 我這一題是這樣做的,請各位過目看看有沒有問題~ 先假設所求為C(mxm),則 for(int k=0;k<m;k++) for(int i=0;i<m;i++) for(int j=0;j<n;j++) C[k][i] += A[i][j]*B[j][i]; -------------------------------------------------------------------------- 5.TOM買了一個宣稱200MB的硬碟(會不會太小...不過這不是重點) 但是WINDOWS顯示只有190.7MB,TOM打電話給廠商去抱怨少了9MB,但是廠商堅稱 200MB是真的,聰明的你能解釋為什麼會這樣嗎? -------------------------------------------------------------------------- 6.Please write a C program that exhibits the problem of memory leakage. Please write another C program that exhibits the dangling pointer. ------------------------------------------------------------------------- 版眾品質,堅若磐石~!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 125.228.130.124

06/24 11:36, , 1F
第五題~~我不聰明~~所以我不會~~
06/24 11:36, 1F

06/24 12:23, , 2F
5.(1)電腦是2^10才進一個單位1mb=1024kb,而windows顯示是
06/24 12:23, 2F

06/24 12:25, , 3F
1mb=1000kb。
06/24 12:25, 3F

06/24 12:26, , 4F
(2)請親自劃分磁區,就知為何
06/24 12:26, 4F

06/24 12:27, , 5F
有錯請指教,這只是我的印象,怕誤導版眾
06/24 12:27, 5F

06/24 12:29, , 6F
(1)的講法好像錯了,應該是(2)才對 囧
06/24 12:29, 6F

06/24 17:06, , 7F
應該說,正確廠商來說是以1000為單位作計算,而非1024
06/24 17:06, 7F

06/24 17:06, , 8F
以DVD光碟片來說4.7GB實際上是4.7*1000^3/1024^3 = 4.3GB
06/24 17:06, 8F

06/24 17:10, , 9F
因為廠商為了計算方便 以1000做單位,但是電腦用1024
06/24 17:10, 9F

06/24 17:11, , 10F
才會造成誤差~ 有錯請指教。
06/24 17:11, 10F

06/24 18:09, , 11F
樓上說的有可能.但是劃分磁區需要消耗一些空間給設定檔,
06/24 18:09, 11F

06/24 18:10, , 12F
所以windows顯示磁碟空間才不到200mb
06/24 18:10, 12F

06/24 18:15, , 13F
我家DVD空白片是4.7GB用OS看只有4.5GB XD
06/24 18:15, 13F

06/24 18:15, , 14F
總之這都能解釋吧...大家都很聰明^_<
06/24 18:15, 14F

06/25 00:45, , 15F
顯然在計概板比微積分版安詳許多~"~
06/25 00:45, 15F

06/25 00:58, , 16F
摟上感觸很深!? XD 也許大家最近心情比較煩燥吧...
06/25 00:58, 16F

06/25 01:07, , 17F
真的,期末適逢有些學校已經開始招考 So,.....
06/25 01:07, 17F

06/25 02:04, , 18F
第四題:應該是j<n
06/25 02:04, 18F

06/25 02:06, , 19F
好像很多93聯大的題目XD
06/25 02:06, 19F

06/25 08:09, , 20F
啊打錯~
06/25 08:09, 20F
※ 編輯: antirazin 來自: 125.226.177.91 (06/25 08:09)
文章代碼(AID): #16VTUWmE (TransCSI)
文章代碼(AID): #16VTUWmE (TransCSI)