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嗎? 寫題目常常看到