Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在不运行的情况下写下合并排序递归算法(在给定输入上)的比较列表?
我将参加考试,那里会被问到类似的问题,而我无法在计算机上进行。
例如在那个输入 A = { 2, 3, 1, 4, 5, 0, 4, 2, 7, 8 }
您可以使用这个 Demo:MergeSort demo with comparison bounds
此页面演示了 MergeSort。同时,它显示了实际使用的比较次数,以及这个数字的最坏情况上限。
您可以观看人们跳舞合并排序算法
http://www.youtube.com/watch?v=XaqR3G_NVoo
玩得开心