[英]what is the worst and best case run time for insertion sort and merge sort?
其中哪些是正確的? 插入和合並排序的最壞和最佳情況運行時間?
插入排序(最佳情況):大 O(n) 或 theta (n)(最壞情況):大 O(n^2) 或 theta (n^2)?
合並排序(最佳情況):大 O(n log n)或 theta(n log n)(最壞情況):大 O(n log n)還是 theta(nlog n)?
兩者都是正確的。 祝你好運
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.