看板 Grad-ProbAsk 關於我們 聯絡資訊
他是挑出最大OR最小一像加入陣列尾端(開頭) 但原本資料不就占了一個陣列 挑完之後擺入位置 不是應該再多一個陣列嗎? 為啥空間複雜度是O(1)?_ -- Truth enlights the mind, but wont always bring happiness to ur heart... ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁╴╴╴▅▃▃▃▃ █████████████████████████████◤ o=o≡≡≡▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▅▅▔▔▅▅▅▅ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.45.59.30
s987692:swap 裡的temp變數 所需空間 03/18 00:36
joechou0929:所以若用這種做法 就不是stable sort囉? 03/18 00:38
s987692:unstale 不是嗎? 03/18 00:44
joechou0929:恩 但若加上另一一為陣列實做可達穩定 03/18 01:02