看板 TransCSI 關於我們 聯絡資訊
1.A list contains the following elements: 2 13 7 26 43 23 91 52. What is the value of the 6th element in the list after three more passes of the insertion sort? (a) 2 (b) 23 (c) 26 (d) 52 (e) none of the above 2.Show the value of the varible y in the following code. Stack(S1); Push(S1,5); Push(S1,3); Push(S1,2); Pop(S1,x); Pop(S1,y); Push(S1,6); (a) 2 (b) 3 (c) 5 (d) 6 (e)none of the adove 第一題想請問這是要用"氣泡" 還是"選擇"排序法? 然後 題目中說的 在第6元素中插入排序 是什麼意思?? 第2題想請問如何用堆疊和佇列計算?? 請各位指點迷津 感恩!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.36.150.168
chenul013:不好意思 標題多打字 沒有別的意思 05/20 12:09
kerokwxwen:這兩題都很單純,(1)用插入排序求第三個pass的第6個元素 05/20 15:55
kerokwxwen:(2)很明顯是用堆疊做,答案是3,選B 05/20 15:56
stator:1.B 2.B 05/20 16:53
chenul013:我有算出來了 謝謝大家!! 05/21 20:17