看板 Grad-ProbAsk 關於我們 聯絡資訊
Let L = (a, b, c, d, e, f, g) be a linear list that is represented in an array element. The i-th element of the linear list mapped into an array position using formula position(i) = element.length - i - 1 Assume that element.length = 8. Draw figures showing the contens of the array element following each operation in the operation sequence: initial state , add(3, h), remove(5). -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.233.169.131
koehie:我先寫我的答案給大家看,請大家幫我看一下。 12/14 01:48
koehie:(1) initial state (g, f, e, d, c, b, a) 12/14 01:50
koehie:(2) add(3, h) (g, f, e, h, d, c, b, a) 12/14 01:50
koehie:(3) remove(5) (g, f, e, h, d, b, a) 12/14 01:51
tureday:我剛算的答案跟你一樣 12/14 18:03
koehie:是喔 12/14 21:19