[理工] 演算法divide and conquer

作者: AdonisLam (Adonis)   2019-07-31 10:35:49
第十一題 紅箭頭地方 如圖
為什麼這裡是加上A list剩餘的個數?
https://imgur.com/a/F7K5VX9
作者: mi981027 (呱呱竹)   2019-07-31 23:38:00
點開來的圖片很糊欸 要再拍一次嗎@@
作者: mathtsai (mathtsai)   2019-08-01 01:46:00
這題就是考merge sort而已不是嗎?這題我記得是introduction to algorithms的習題
作者: rayskevin (KingSlayer)   2019-08-01 07:52:00
因為那些剩餘的都是inversions啊Be noted that the left sublist is sorted.
作者: AdonisLam (Adonis)   2019-08-02 00:30:00
啊瞭解了 沒發現merge有做到sort的功能 感謝

Links booklink

Contact Us: admin [ a t ] ucptt.com