[理工] 104 成大電通 資結
1.When n (n>2) data items are sorted using bubble sort algorithm and the number of key comparison is k, if the number of data item exchanges is 1, then k<=2*(n-1)
這邊不太懂他的key comparison 是什麼意思
下面這裡 不懂他題目中的兩個key是在幹嘛的@@
像第一題找適合的sort into non-decreasing order based on key1 就不知道這個key1是什麼了…
http://i.imgur.com/vuXtkHw.jpg

順便問一下non-decreasing order是指說不在worst case嗎? 寫題目常常看到
-----
Sent from JPTT on my Sony D6653.
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 117.19.164.233
※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1516778035.A.70C.html
推
01/24 16:05,
8年前
, 1F
01/24 16:05, 1F
→
01/24 16:05,
8年前
, 2F
01/24 16:05, 2F
→
01/24 16:05,
8年前
, 3F
01/24 16:05, 3F
噓
01/24 16:07,
8年前
, 4F
01/24 16:07, 4F
→
01/24 16:07,
8年前
, 5F
01/24 16:07, 5F
→
01/24 16:07,
8年前
, 6F
01/24 16:07, 6F
→
01/24 16:08,
8年前
, 7F
01/24 16:08, 7F
→
01/24 21:45,
8年前
, 8F
01/24 21:45, 8F
→
01/24 21:46,
8年前
, 9F
01/24 21:46, 9F
→
01/24 21:46,
8年前
, 10F
01/24 21:46, 10F
→
01/24 21:46,
8年前
, 11F
01/24 21:46, 11F
推
02/21 16:36,
7年前
, 12F
02/21 16:36, 12F
→
02/21 16:36,
7年前
, 13F
02/21 16:36, 13F